diff --git a/patches/net/minecraft/block/BlockRedstoneWire.java.patch b/patches/net/minecraft/block/BlockRedstoneWire.java.patch index 6f79d227..da659e27 100644 --- a/patches/net/minecraft/block/BlockRedstoneWire.java.patch +++ b/patches/net/minecraft/block/BlockRedstoneWire.java.patch @@ -1,16 +1,15 @@ --- a/net/minecraft/block/BlockRedstoneWire.java +++ b/net/minecraft/block/BlockRedstoneWire.java -@@ -43,7 +43,8 @@ - public static final IntegerProperty POWER = BlockStateProperties.POWER_0_15; +@@ -44,6 +44,8 @@ public static final Map> FACING_PROPERTY_MAP = Maps.newEnumMap(ImmutableMap.of(EnumFacing.NORTH, NORTH, EnumFacing.EAST, EAST, EnumFacing.SOUTH, SOUTH, EnumFacing.WEST, WEST)); protected static final VoxelShape[] SHAPES = new VoxelShape[] {Block.makeCuboidShape(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.makeCuboidShape(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.makeCuboidShape(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.makeCuboidShape(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.makeCuboidShape(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.makeCuboidShape(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.makeCuboidShape(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.makeCuboidShape(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.makeCuboidShape(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.makeCuboidShape(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.makeCuboidShape(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.makeCuboidShape(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D), Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.makeCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D)}; -- private boolean canProvidePower = true; + private boolean canProvidePower = true; + //CM changed to access for fast redstone -+ public boolean canProvidePower = true; ++ public void setCanProvidePower(boolean v) { canProvidePower = v; } private final Set blocksNeedingUpdate = Sets.newHashSet(); public BlockRedstoneWire(Block.Properties builder) -@@ -190,7 +191,8 @@ +@@ -190,7 +192,8 @@ return state; } diff --git a/patches/net/minecraft/entity/ai/EntityAIFindEntityNearestPlayer.java.patch b/patches/net/minecraft/entity/ai/EntityAIFindEntityNearestPlayer.java.patch index 8a016b7d..b20559d8 100644 --- a/patches/net/minecraft/entity/ai/EntityAIFindEntityNearestPlayer.java.patch +++ b/patches/net/minecraft/entity/ai/EntityAIFindEntityNearestPlayer.java.patch @@ -1,11 +1,10 @@ --- a/net/minecraft/entity/ai/EntityAIFindEntityNearestPlayer.java +++ b/net/minecraft/entity/ai/EntityAIFindEntityNearestPlayer.java -@@ -18,7 +18,8 @@ - public class EntityAIFindEntityNearestPlayer extends EntityAIBase +@@ -19,6 +19,8 @@ { private static final Logger LOGGER = LogManager.getLogger(); -- private final EntityLiving entityLiving; -+ private final EntityLiving entityLiving; // CM so I can access + private final EntityLiving entityLiving; ++ // CM so I can access + protected EntityLiving getEntityLiving() { return entityLiving; } private final Predicate predicate; private final EntityAINearestAttackableTarget.Sorter sorter; diff --git a/patches/net/minecraft/entity/monster/EntityZombieVillager.java.patch b/patches/net/minecraft/entity/monster/EntityZombieVillager.java.patch index e77bfe7e..46441733 100644 --- a/patches/net/minecraft/entity/monster/EntityZombieVillager.java.patch +++ b/patches/net/minecraft/entity/monster/EntityZombieVillager.java.patch @@ -1,11 +1,10 @@ --- a/net/minecraft/entity/monster/EntityZombieVillager.java +++ b/net/minecraft/entity/monster/EntityZombieVillager.java -@@ -35,7 +35,9 @@ - { +@@ -36,6 +36,8 @@ private static final DataParameter CONVERTING = EntityDataManager.createKey(EntityZombieVillager.class, DataSerializers.BOOLEAN); private static final DataParameter PROFESSION = EntityDataManager.createKey(EntityZombieVillager.class, DataSerializers.VARINT); -+ //[CM] public for entity info private int conversionTime; ++ //[CM] public for entity info + public int getConversionTime() { return conversionTime; } private UUID converstionStarter; diff --git a/patches/net/minecraft/util/WeightedRandom.java.patch b/patches/net/minecraft/util/WeightedRandom.java.patch deleted file mode 100644 index 5e1239a7..00000000 --- a/patches/net/minecraft/util/WeightedRandom.java.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/net/minecraft/util/WeightedRandom.java -+++ b/net/minecraft/util/WeightedRandom.java -@@ -57,7 +57,7 @@ - - public static class Item - { -- protected int itemWeight; -+ public int itemWeight; // CM changed from protected to public - - public Item(int itemWeightIn) - { diff --git a/patches/net/minecraft/world/biome/Biome.java.patch b/patches/net/minecraft/world/biome/Biome.java.patch new file mode 100644 index 00000000..69362da8 --- /dev/null +++ b/patches/net/minecraft/world/biome/Biome.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/world/biome/Biome.java ++++ b/net/minecraft/world/biome/Biome.java +@@ -830,6 +830,8 @@ + { + return EntityType.getId(this.entityType) + "*(" + this.minGroupCount + "-" + this.maxGroupCount + "):" + this.itemWeight; + } ++ //CM ++ public int getItemWeight() { return itemWeight; } + } + + public static enum TempCategory diff --git a/src/main/java/carpet/helpers/RedstoneWireTurbo.java b/src/main/java/carpet/helpers/RedstoneWireTurbo.java index 43713d77..0b456074 100644 --- a/src/main/java/carpet/helpers/RedstoneWireTurbo.java +++ b/src/main/java/carpet/helpers/RedstoneWireTurbo.java @@ -842,14 +842,14 @@ private IBlockState calculateCurrentChanges(final World worldIn, final UpdateNod j = this.getMaxCurrentStrength(upd, j); int l = 0; - wire.canProvidePower = false; + wire.setCanProvidePower(false); // Unfortunately, World.isBlockIndirectlyGettingPowered is complicated, // and I'm not ready to try to replicate even more functionality from // elsewhere in Minecraft into this accelerator. So sadly, we must // suffer the performance hit of this very expensive call. If there // is consistency to what this call returns, we may be able to cache it. final int k = worldIn.getRedstonePowerFromNeighbors(upd.self); - wire.canProvidePower = true; + wire.setCanProvidePower(true); // The variable 'k' holds the maximum redstone power value of any adjacent blocks. // If 'k' has the highest level of all neighbors, then the power level of this diff --git a/src/main/java/carpet/utils/SpawnReporter.java b/src/main/java/carpet/utils/SpawnReporter.java index 1de5a597..97803d6a 100644 --- a/src/main/java/carpet/utils/SpawnReporter.java +++ b/src/main/java/carpet/utils/SpawnReporter.java @@ -458,7 +458,7 @@ public static List report(BlockPos pos, World worldIn) String creature_name = entityliving.getEntityString(); String pack_size = String.format("%d", entityliving.getMaxSpawnedInChunk());//String.format("%d-%d", animal.minGroupCount, animal.maxGroupCount); - int weight = animal.itemWeight; + int weight = animal.getItemWeight(); if (canspawn) { String c = (fits_true && will_spawn>0)?"e":"gi";