This commit is contained in:
gnembon committed 2019-10-02 16:17:07 -03:00
1 parent 412b33fee2
commit 6f156f9fc2
7 files changed
+12 -12

No files matched your search

+2 -2
View File
@@ -4,8 +4,8 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html # or better: https://modmuss50.me/fabric.html
minecraft_version=19w39a minecraft_version=19w40a
yarn_mappings=19w39a+build.2 yarn_mappings=19w40a+build.1
loader_version=0.6.2+build.166 loader_version=0.6.2+build.166
# Mod Properties # Mod Properties
@@ -25,11 +25,11 @@ public class InventoryHelper
boolean changed = false; boolean changed = false;
CompoundTag tag = stack.getTag(); CompoundTag tag = stack.getTag();
if (tag == null || !tag.containsKey("BlockEntityTag", TAG_COMPOUND)) if (tag == null || !tag.contains("BlockEntityTag", TAG_COMPOUND))
return false; return false;
CompoundTag bet = tag.getCompound("BlockEntityTag"); CompoundTag bet = tag.getCompound("BlockEntityTag");
if (bet.containsKey("Items", TAG_LIST) && bet.getList("Items", TAG_COMPOUND).isEmpty()) if (bet.contains("Items", TAG_LIST) && bet.getList("Items", TAG_COMPOUND).isEmpty())
{ {
bet.remove("Items"); bet.remove("Items");
changed = true; changed = true;
@@ -48,10 +48,10 @@ public class InventoryHelper
{ {
CompoundTag tag = stack.getTag(); CompoundTag tag = stack.getTag();
if (tag == null || !tag.containsKey("BlockEntityTag", TAG_COMPOUND)) if (tag == null || !tag.contains("BlockEntityTag", TAG_COMPOUND))
return false; return false;
CompoundTag bet = tag.getCompound("BlockEntityTag"); CompoundTag bet = tag.getCompound("BlockEntityTag");
return bet.containsKey("Items", TAG_LIST) && !bet.getList("Items", TAG_COMPOUND).isEmpty(); return bet.contains("Items", TAG_LIST) && !bet.getList("Items", TAG_COMPOUND).isEmpty();
} }
} }
@@ -12,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(HuskEntity.class) @Mixin(HuskEntity.class)
public class HuskEntityMixin public class HuskEntityMixin
{ {
@Redirect(method = "method_20677", at = @At(value = "INVOKE", target="Lnet/minecraft/world/IWorld;isSkyVisible(Lnet/minecraft/util/math/BlockPos;)Z")) @Redirect(method = "canSpawn", at = @At(value = "INVOKE", target="Lnet/minecraft/world/IWorld;isSkyVisible(Lnet/minecraft/util/math/BlockPos;)Z"))
private static boolean isSkylightOrTempleVisible(IWorld iWorld, BlockPos blockPos_1) private static boolean isSkylightOrTempleVisible(IWorld iWorld, BlockPos blockPos_1)
{ {
return iWorld.isSkyVisible(blockPos_1) || return iWorld.isSkyVisible(blockPos_1) ||
@@ -118,7 +118,7 @@ public abstract class PistonBlockEntity_movableTEMixin extends BlockEntity imple
@Inject(method = "fromTag", at = @At(value = "TAIL")) @Inject(method = "fromTag", at = @At(value = "TAIL"))
private void onFromTag(CompoundTag compoundTag_1, CallbackInfo ci) private void onFromTag(CompoundTag compoundTag_1, CallbackInfo ci)
{ {
if (CarpetSettings.movableBlockEntities && compoundTag_1.containsKey("carriedTileEntityCM", 10)) if (CarpetSettings.movableBlockEntities && compoundTag_1.contains("carriedTileEntityCM", 10))
{ {
if (this.pushedBlock.getBlock() instanceof BlockEntityProvider) if (this.pushedBlock.getBlock() instanceof BlockEntityProvider)
this.carriedBlockEntity = ((BlockEntityProvider) (this.pushedBlock.getBlock())).createBlockEntity(this.world); this.carriedBlockEntity = ((BlockEntityProvider) (this.pushedBlock.getBlock())).createBlockEntity(this.world);
@@ -17,7 +17,7 @@ public class WorldRenderer_pausedShakeMixin
float initial = 0.0f; float initial = 0.0f;
@ModifyVariable(method = "method_22710", argsOnly = true, ordinal = 0 ,at = @At( @ModifyVariable(method = "render", argsOnly = true, ordinal = 0 ,at = @At(
value = "INVOKE", value = "INVOKE",
target = "Lnet/minecraft/client/world/ClientWorld;getEntities()Ljava/lang/Iterable;" target = "Lnet/minecraft/client/world/ClientWorld;getEntities()Ljava/lang/Iterable;"
)) ))
@@ -29,7 +29,7 @@ public class WorldRenderer_pausedShakeMixin
return previous; return previous;
} }
@ModifyVariable(method = "method_22710", argsOnly = true, ordinal = 0 ,at = @At( @ModifyVariable(method = "render", argsOnly = true, ordinal = 0 ,at = @At(
value = "INVOKE", value = "INVOKE",
target = "Lnet/minecraft/client/particle/ParticleManager;renderParticles(Lnet/minecraft/client/render/Camera;F)V", target = "Lnet/minecraft/client/particle/ParticleManager;renderParticles(Lnet/minecraft/client/render/Camera;F)V",
shift = At.Shift.BEFORE shift = At.Shift.BEFORE
@@ -178,7 +178,7 @@ public class PerimeterDiagnostics
{ {
el.setPositionAndAngles((float)pos.getX() + 0.5F, (float)pos.getY(), (float)pos.getZ()+0.5F, 0.0F, 0.0F); el.setPositionAndAngles((float)pos.getX() + 0.5F, (float)pos.getY(), (float)pos.getZ()+0.5F, 0.0F, 0.0F);
return el.canSpawn(worldServer) && return el.canSpawn(worldServer) &&
SpawnRestriction.method_20638(el.getType(),el.getEntityWorld(), SpawnType.NATURAL, el.getBlockPos(), el.getEntityWorld().random) && SpawnRestriction.canSpawn(el.getType(),el.getEntityWorld(), SpawnType.NATURAL, el.getBlockPos(), el.getEntityWorld().random) &&
worldServer.doesNotCollide(el); // check collision rules once they stop fiddling with them after 1.14.1 worldServer.doesNotCollide(el); // check collision rules once they stop fiddling with them after 1.14.1
} }
return false; return false;
@@ -439,7 +439,7 @@ public class SpawnReporter
for (int i = 0; i < 20; ++i) for (int i = 0; i < 20; ++i)
{ {
if (SpawnRestriction.method_20638(mob.getType(),mob.getEntityWorld(), SpawnType.NATURAL, mob.getBlockPos(), mob.getEntityWorld().random)) if (SpawnRestriction.canSpawn(mob.getType(),mob.getEntityWorld(), SpawnType.NATURAL, mob.getBlockPos(), mob.getEntityWorld().random))
{ {
will_spawn += 1; will_spawn += 1;
} }