Skip to content

Commit

Permalink
minimum change set to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 11, 2019
1 parent 192f49b commit f1d884d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,20 @@ public void changeBlockBiome(Location location) {
Chunk chunk = world.getChunkAtWorldCoords(new BlockPosition(x, 0, z));

if (chunk != null) {
BiomeBase[] biomevals = chunk.getBiomeIndex();
biomevals[((z & 0xF) << 4) | (x & 0xF)] = biomeBase;
BiomeStorage biomes = chunk.getBiomeIndex();
biomes.setBiome(z, 0, x, biomeBase); // TODO: 1.15 -> logic changed. Is this correct? Original: biomevals[((z & 0xF) << 4) | (x & 0xF)] = biomeBase;
}
}
}

@Override
protected boolean getDoesRain() {
return biomeBase.b() == BiomeBase.Precipitation.RAIN;
return biomeBase.d() == BiomeBase.Precipitation.RAIN;
}

@Override
protected boolean getDoesSnow() {
return biomeBase.b() == BiomeBase.Precipitation.SNOW;
return biomeBase.d() == BiomeBase.Precipitation.SNOW;
}

private List<EntityType> getSpawnableEntities(EnumCreatureType creatureType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public EntityFakePlayerImpl(MinecraftServer minecraftserver, WorldServer worldse
NetworkManager networkManager = new FakeNetworkManagerImpl(EnumProtocolDirection.CLIENTBOUND);
playerConnection = new FakePlayerConnectionImpl(minecraftserver, networkManager, this);
networkManager.setPacketListener(playerConnection);
datawatcher.set(EntityHuman.bt, (byte) 127);
datawatcher.set(EntityHuman.bq, (byte) 127);
worldserver.addEntity(this, CreatureSpawnEvent.SpawnReason.CUSTOM);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public EntityItemProjectileImpl(CraftWorld craftWorld, Location location, org.bu

@Override
public void tick() {
this.H = this.locX;
this.I = this.locY;
this.J = this.locZ;
this.E = this.locX();
this.F = this.locY();
this.G = this.locZ();
super.tick();
if (this.shake > 0) {
--this.shake;
Expand Down Expand Up @@ -92,9 +92,7 @@ public void tick() {
}

Vec3D vec3d = this.getMot();
this.locX += vec3d.x;
this.locY += vec3d.y;
this.locZ += vec3d.z;
this.setPositionRaw(this.locX() + vec3d.x, this.locY() + vec3d.y, this.locZ() + vec3d.z);
float f = MathHelper.sqrt(b(vec3d));
this.yaw = (float) (MathHelper.d(vec3d.x, vec3d.z) * 57.2957763671875D);

Expand All @@ -120,7 +118,7 @@ public void tick() {
if (this.isInWater()) {
for (int i = 0; i < 4; ++i) {
float f2 = 0.25F;
this.world.addParticle(Particles.BUBBLE, this.locX - vec3d.x * 0.25D, this.locY - vec3d.y * 0.25D, this.locZ - vec3d.z * 0.25D, vec3d.x, vec3d.y, vec3d.z);
this.world.addParticle(Particles.BUBBLE, this.locX() - vec3d.x * 0.25D, this.locY() - vec3d.y * 0.25D, this.locZ() - vec3d.z * 0.25D, vec3d.x, vec3d.y, vec3d.z);
}

f1 = 0.8F;
Expand All @@ -135,7 +133,7 @@ public void tick() {
this.setMot(vec3d1.x, vec3d1.y - 0.03, vec3d1.z);
}

this.setPosition(this.locX, this.locY, this.locZ);
this.setPosition(this.locX(), this.locY(), this.locZ());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ public boolean processAttachToForPacket(Packet<?> packet) {
boolean rotationBasis = NMSHandler.getInstance().attachmentRotations.contains(att);
Vector goalPosition;
if (!rotationBasis) {
goalPosition = new Vector(e.locX, e.locY, e.locZ).add(offset);
goalPosition = new Vector(e.locX(), e.locY(), e.locZ()).add(offset);
}
else {
goalPosition = new Vector(e.locX, e.locY, e.locZ).add(NMSHandler.fixOffset(offset, -e.yaw, e.pitch));
goalPosition = new Vector(e.locX(), e.locY(), e.locZ()).add(NMSHandler.fixOffset(offset, -e.yaw, e.pitch));
}
Vector oldPos = NMSHandler.getInstance().visiblePositions.get(target.getUniqueId());
if (oldPos == null) {
Expand Down

0 comments on commit f1d884d

Please sign in to comment.