1.15 pre1 - 7

This commit is contained in:
gnembon committed 2019-11-25 15:17:44 -04:00
1 parent aa8f5c1921
commit a463b10bca
17 files changed
+36 -36

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G
# check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html
minecraft_version=1.15-pre1
yarn_mappings=1.15-pre1+build.3
yarn_mappings=1.15-pre1+build.7
loader_version=0.7.1+build.173
# Mod Properties
@@ -40,7 +40,7 @@ public class FeatureGenerator
{
return (w, p) -> {
CarpetSettings.skipGenerationChecks=true;
boolean res = feature.generate(w, w.method_14178().getChunkGenerator(), w.random, p, config);
boolean res = feature.generate(w, w.getChunkManager().getChunkGenerator(), w.random, p, config);
CarpetSettings.skipGenerationChecks=false;
return res;
};
@@ -52,7 +52,7 @@ public class FeatureGenerator
//if (1+2==3)
// throw new RuntimeException("rebuild me");
return (w, p) -> {
ChunkGenerator chunkgen = new OverworldChunkGenerator(w, w.method_14178().getChunkGenerator().getBiomeSource(), new OverworldChunkGeneratorConfig()) // BiomeSourceType.VANILLA_LAYERED.applyConfig((BiomeSourceType.VANILLA_LAYERED.getConfig())), ChunkGeneratorType.SURFACE.createSettings())
ChunkGenerator chunkgen = new OverworldChunkGenerator(w, w.getChunkManager().getChunkGenerator().getBiomeSource(), new OverworldChunkGeneratorConfig()) // BiomeSourceType.VANILLA_LAYERED.applyConfig((BiomeSourceType.VANILLA_LAYERED.getConfig())), ChunkGeneratorType.SURFACE.createSettings())
{
@Override
public <C extends FeatureConfig> C getStructureConfig(Biome biome_1, StructureFeature<C> structureFeature_1)
@@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public abstract class ClientConnectionMixin
{
// Add to the packet counter whenever a packet is received.
@Inject(method = "method_10770", at = @At("HEAD"))
@Inject(method = "channelRead0", at = @At("HEAD"))
private void packetInCount(ChannelHandlerContext channelHandlerContext_1, Packet<?> packet_1, CallbackInfo ci)
{
PacketCounter.totalIn++;
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(FossilFeature.class)
public class FossilFeatureMixin
{
@Redirect(method = "method_13236", at = @At(
@Redirect(method = "generate", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/IWorld;getTopY(Lnet/minecraft/world/Heightmap$Type;II)I"
))
@@ -23,7 +23,7 @@ public abstract class PistonBlockEntityRenderer_movableTEMixin extends BlockEnti
super(blockEntityRenderDispatcher_1);
}
@Inject(method = "method_3576", at = @At(value = "INVOKE",
@Inject(method = "render", at = @At(value = "INVOKE",
target = "Lnet/minecraft/client/render/block/entity/PistonBlockEntityRenderer;method_3575(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/world/World;ZI)V", ordinal = 3))
private void updateRenderBool(PistonBlockEntity pistonBlockEntity_1, float float_1, MatrixStack matrixStack_1, VertexConsumerProvider layeredVertexConsumerStorage_1, int int_1, int int_2, CallbackInfo ci)
//private void updateRenderBool(PistonBlockEntity pistonBlockEntity_1, double double_1, double double_2, double double_3, float float_1, class_4587 class_4587_1, class_4597 class_4597_1, int int_1, CallbackInfo ci)
@@ -33,7 +33,7 @@ public abstract class PistonBlockEntityRenderer_movableTEMixin extends BlockEnti
}
@Inject(method = "method_3576", at = @At("RETURN"), locals = LocalCapture.NO_CAPTURE)
@Inject(method = "render", at = @At("RETURN"), locals = LocalCapture.NO_CAPTURE)
private void endMethod3576(PistonBlockEntity pistonBlockEntity_1, float partialTicks, MatrixStack matrixStack_1, VertexConsumerProvider layeredVertexConsumerStorage_1, int int_1, int init_2, CallbackInfo ci)
{
if (((PistonBlockEntityInterface) pistonBlockEntity_1).getRenderCarriedBlockEntity())
@@ -28,7 +28,7 @@ public abstract class PlayerEntity_horseFixMixin extends Entity
{
super(entityType_1, world_1);
}
/* fixed in 1.15 pre-2
@Inject(method = "stopRiding", at = @At("HEAD"))
private void resetNavigation(CallbackInfo ci)
{
@@ -38,11 +38,11 @@ public abstract class PlayerEntity_horseFixMixin extends Entity
((MobEntity) getVehicle()).getNavigation().stop();
if (!getEntityWorld().isClient)
{
((ServerWorld) getEntityWorld()).method_14178().sendToNearbyPlayers(this, new EntityPositionS2CPacket(getVehicle()));
((ServerWorld) getEntityWorld()).getChunkManager().sendToNearbyPlayers(this, new EntityPositionS2CPacket(getVehicle()));
// not sure if player at this point is actually considered to be next to the exiting vehicle
((ServerPlayerEntity)(Object)this).networkHandler.sendPacket(new EntityPositionS2CPacket(getVehicle()));
((ServerPlayerEntity)(Object)this).networkHandler.sendPacket(new VehicleMoveS2CPacket(getVehicle()));
}
}
}
}*/
}
@@ -105,7 +105,7 @@ public abstract class RedstoneWireBlockMixin implements RedstoneWireBlockInterfa
if (blockState_3.isSimpleFullBlock(world_1, blockPos_2) && !world_1.getBlockState(blockPos_3).isSimpleFullBlock(world_1, blockPos_3)) {
int_3 = this.increasePower(int_3, world_1.getBlockState(blockPos_2.up()));
} else if (!blockState_3.isSimpleFullBlock(world_1, blockPos_2)) {
int_3 = this.increasePower(int_3, world_1.getBlockState(blockPos_2.method_10074()));
int_3 = this.increasePower(int_3, world_1.getBlockState(blockPos_2.down()));
}
}
}
@@ -27,7 +27,7 @@ public abstract class ServerWorld_fakePlayersMixin
if ( !(ticking && serverPlayerEntity_1 instanceof EntityPlayerMPFake) )
serverWorld.removeEntity(entity_1);
else
getServer().method_18858(new ServerTask(getServer().getTicks(), () ->
getServer().send(new ServerTask(getServer().getTicks(), () ->
{
serverWorld.removeEntity(serverPlayerEntity_1);
serverPlayerEntity_1.onTeleportationDone();
@@ -35,7 +35,7 @@ public abstract class StructureFeatureMixin implements StructureFeatureInterface
@Override
public boolean plopAnywhere(ServerWorld world, BlockPos pos)
{
return plopAnywhere(world, pos, world.method_14178().getChunkGenerator());
return plopAnywhere(world, pos, world.getChunkManager().getChunkGenerator());
}
@Override
public boolean plopAnywhere(ServerWorld world, BlockPos pos, ChunkGenerator<? extends ChunkGeneratorConfig> generator)
@@ -59,7 +59,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
interactionManagerIn.setGameMode(gamemode);
server.getPlayerManager().sendToDimension(new EntitySetHeadYawS2CPacket(instance, (byte) (instance.headYaw * 256 / 360)), instance.dimension);
server.getPlayerManager().sendToDimension(new EntityPositionS2CPacket(instance), instance.dimension);
instance.getServerWorld().method_14178().updateCameraPosition(instance);
instance.getServerWorld().getChunkManager().updateCameraPosition(instance);
instance.dataTracker.set(PLAYER_MODEL_BIT_MASK, (byte) 0x7f); // show all model layers (incl. capes)
return instance;
}
@@ -84,7 +84,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
server.getPlayerManager().sendToDimension(new EntitySetHeadYawS2CPacket(playerShadow, (byte) (player.headYaw * 256 / 360)), playerShadow.dimension);
server.getPlayerManager().sendToAll(new PlayerListS2CPacket(PlayerListS2CPacket.Action.ADD_PLAYER, playerShadow));
player.getServerWorld().method_14178().updateCameraPosition(playerShadow);
player.getServerWorld().getChunkManager().updateCameraPosition(playerShadow);
return playerShadow;
}
@@ -96,7 +96,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
@Override
public void kill()
{
this.server.method_18858(new ServerTask(this.server.getTicks(), () -> {
this.server.send(new ServerTask(this.server.getTicks(), () -> {
this.networkHandler.onDisconnected(Messenger.s("Killed"));
}));
}
@@ -107,7 +107,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
if (this.getServer().getTicks() % 10 == 0)
{
this.networkHandler.syncWithPlayerPosition();
this.getServerWorld().method_14178().updateCameraPosition(this);
this.getServerWorld().getChunkManager().updateCameraPosition(this);
}
super.tick();
this.playerTick();
@@ -307,10 +307,10 @@ public class CarpetExpression
for (int i = 0; i<16; i++)
{
BlockPos section = new BlockPos((pos.getX()>>4 <<4)+8, 16*i, (pos.getZ()>>4 <<4)+8);
world.method_14178().markForUpdate(section);
world.method_14178().markForUpdate(section.east());
world.method_14178().markForUpdate(section.west());
world.method_14178().markForUpdate(section.north());
world.getChunkManager().markForUpdate(section);
world.getChunkManager().markForUpdate(section.east());
world.getChunkManager().markForUpdate(section.west());
world.getChunkManager().markForUpdate(section.north());
}
}
@@ -748,7 +748,7 @@ public class CarpetExpression
int howMuch = 1;
if (lv.size() > locator.offset+1)
howMuch = (int) NumericValue.asNumber(lv.get(locator.offset+1).evalValue(c)).getLong();
BlockPos retpos = pos.method_10079(dir, howMuch);
BlockPos retpos = pos.offset(dir, howMuch);
Value ret = ListValue.of(new NumericValue(retpos.getX()), new NumericValue(retpos.getY()), new NumericValue(retpos.getZ()));
return (cc, tt) -> ret;
});
@@ -927,7 +927,7 @@ public class CarpetExpression
BlockEntity be = world.getBlockEntity(targetPos);
if (be != null)
{
CompoundTag destTag = data.method_10553();
CompoundTag destTag = data.copy();
destTag.putInt("x", targetPos.getX());
destTag.putInt("y", targetPos.getY());
destTag.putInt("z", targetPos.getZ());
@@ -2208,7 +2208,7 @@ public class CarpetExpression
List<Value> neighbours = new ArrayList<>();
neighbours.add(new BlockValue(null, world, center.up()));
neighbours.add(new BlockValue(null, world, center.method_10074()));
neighbours.add(new BlockValue(null, world, center.down()));
neighbours.add(new BlockValue(null, world, center.north()));
neighbours.add(new BlockValue(null, world, center.south()));
neighbours.add(new BlockValue(null, world, center.east()));
@@ -466,7 +466,7 @@ public class EntityValue extends Value
else
{
e.setPositionAnglesAndUpdate(x, y, z, yaw, pitch);
((ServerWorld) e.getEntityWorld()).method_14178().sendToNearbyPlayers(e, new EntityPositionS2CPacket(e));
((ServerWorld) e.getEntityWorld()).getChunkManager().sendToNearbyPlayers(e, new EntityPositionS2CPacket(e));
}
}
@@ -488,7 +488,7 @@ public class NBTSerializableValue extends Value implements ContainerValueInterfa
return res;
try
{
res = NbtPathArgumentType.nbtPath().method_9362(new StringReader(arg));
res = NbtPathArgumentType.nbtPath().parse(new StringReader(arg));
}
catch (CommandSyntaxException exc)
{
@@ -176,7 +176,7 @@ public class SettingsManager
{
return;
}
server.method_18858(new ServerTask(this.server.getTicks(), () ->
server.send(new ServerTask(this.server.getTicks(), () ->
{
for (ServerPlayerEntity entityplayermp : server.getPlayerManager().getPlayerList())
{
@@ -107,7 +107,7 @@ public class PerimeterDiagnostics
pos = new BlockPos(eX+x, y, eZ+z);
BlockState iblockstate = worldserver.getBlockState(pos);
BlockState iblockstate_down = worldserver.getBlockState(pos.method_10074());
BlockState iblockstate_down = worldserver.getBlockState(pos.down());
BlockState iblockstate_up = worldserver.getBlockState(pos.up());
if ( iblockstate.getMaterial() == Material.WATER && iblockstate_down.getMaterial() == Material.WATER && !iblockstate_up.isSimpleFullBlock(worldserver, pos))
@@ -155,10 +155,10 @@ public class PerimeterDiagnostics
private boolean check_entity_spawn(BlockPos pos)
{
if (sle == null || !worldServer.method_14178().getChunkGenerator().getEntitySpawnList(ctype, pos).contains(sle))
if (sle == null || !worldServer.getChunkManager().getChunkGenerator().getEntitySpawnList(ctype, pos).contains(sle))
{
sle = null;
for (Biome.SpawnEntry sle: worldServer.method_14178().getChunkGenerator().getEntitySpawnList(ctype, pos))
for (Biome.SpawnEntry sle: worldServer.getChunkManager().getChunkGenerator().getEntitySpawnList(ctype, pos))
{
if (el.getType() == sle.type)
{
@@ -166,7 +166,7 @@ public class PerimeterDiagnostics
break;
}
}
if (sle == null || !worldServer.method_14178().getChunkGenerator().getEntitySpawnList(ctype, pos).contains(sle))
if (sle == null || !worldServer.getChunkManager().getChunkGenerator().getEntitySpawnList(ctype, pos).contains(sle))
{
return false;
}
@@ -165,7 +165,7 @@ public class SpawnReporter
public static List<BaseText> show_mobcaps(BlockPos pos, World worldIn)
{
DyeColor under = WoolTool.getWoolColorAtPosition(worldIn, pos.method_10074());
DyeColor under = WoolTool.getWoolColorAtPosition(worldIn, pos.down());
if (under == null)
{
if (track_spawns > 0L)
@@ -401,7 +401,7 @@ public class SpawnReporter
for (EntityCategory enumcreaturetype : EntityCategory.values())
{
String type_code = String.format("%s", enumcreaturetype).substring(0, 3);
List<Biome.SpawnEntry> lst = ((ChunkGenerator)worldIn.method_14178().getChunkGenerator()).getEntitySpawnList(enumcreaturetype, pos);
List<Biome.SpawnEntry> lst = ((ChunkGenerator)worldIn.getChunkManager().getChunkGenerator()).getEntitySpawnList(enumcreaturetype, pos);
if (lst != null && !lst.isEmpty())
{
for (Biome.SpawnEntry spawnEntry : lst)
+3 -3
View File
@@ -60,7 +60,7 @@ public class WoolTool
break;
case GRAY:
if (CarpetSettings.commandInfo)
Messenger.send(placer, BlockInfo.blockInfo(pos.method_10074(), worldIn));
Messenger.send(placer, BlockInfo.blockInfo(pos.down(), worldIn));
break;
case YELLOW:
if (CarpetSettings.commandInfo)
@@ -70,7 +70,7 @@ public class WoolTool
case GREEN:
if (CarpetSettings.hopperCounters)
{
DyeColor under = getWoolColorAtPosition(worldIn, pos.method_10074());
DyeColor under = getWoolColorAtPosition(worldIn, pos.down());
if (under == null) return;
HopperCounter counter = HopperCounter.getCounter(under.toString());
if (counter != null)
@@ -80,7 +80,7 @@ public class WoolTool
case RED:
if (CarpetSettings.hopperCounters)
{
DyeColor under = getWoolColorAtPosition(worldIn, pos.method_10074());
DyeColor under = getWoolColorAtPosition(worldIn, pos.down());
if (under == null) return;
HopperCounter counter = HopperCounter.getCounter(under.toString());
if (counter == null) return;