inital 19w46a port

This commit is contained in:
modmuss50 2019-11-14 18:37:42 +00:00
parent 3fe62e2c77
commit a984263b04
48 changed files with 356 additions and 339 deletions

View file

@ -59,7 +59,7 @@ public class IronFurnaceBlockEntity extends AbstractIronMachineBlockEntity imple
while (totalExperience > 0) {
int expToDrop = ExperienceOrbEntity.roundToOrbSize(totalExperience);
totalExperience -= expToDrop;
player.world.spawnEntity(new ExperienceOrbEntity(player.world, player.x, player.y + 0.5D, player.z + 0.5D, expToDrop));
player.world.spawnEntity(new ExperienceOrbEntity(player.world, player.getX(), player.getY() + 0.5D, player.getZ() + 0.5D, expToDrop));
}
}
experience = 0;

View file

@ -71,7 +71,7 @@ public class DistillationTowerBlockEntity extends GenericMachineBlockEntity impl
@Override
public void tick() {
if (multiblockChecker == null) {
final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2);
final BlockPos downCenter = pos.method_10079(getFacing().getOpposite(), 2);
multiblockChecker = new MultiblockChecker(world, downCenter);
}

View file

@ -74,7 +74,7 @@ public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implem
@Override
public void tick() {
if (multiblockChecker == null) {
final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2);
final BlockPos downCenter = pos.method_10079(getFacing().getOpposite(), 2);
multiblockChecker = new MultiblockChecker(world, downCenter);
}

View file

@ -63,7 +63,7 @@ public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity
}
// Bottom center of multiblock
final BlockPos location = pos.offset(getFacing().getOpposite(), 2);
final BlockPos location = pos.method_10079(getFacing().getOpposite(), 2);
final BlockEntity blockEntity = world.getBlockEntity(location);
if (blockEntity instanceof MachineCasingBlockEntity) {
@ -83,8 +83,8 @@ public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity
heat += BlockMachineCasing.getHeatFromState(part.getCachedState());
}
if (world.getBlockState(location.offset(Direction.UP, 1)).getMaterial().equals(Material.LAVA)
&& world.getBlockState(location.offset(Direction.UP, 2)).getMaterial().equals(Material.LAVA)) {
if (world.getBlockState(location.method_10079(Direction.UP, 1)).getMaterial().equals(Material.LAVA)
&& world.getBlockState(location.method_10079(Direction.UP, 2)).getMaterial().equals(Material.LAVA)) {
heat += 500;
}
return heat;
@ -121,7 +121,7 @@ public class IndustrialBlastFurnaceBlockEntity extends GenericMachineBlockEntity
@Override
public void tick() {
if (multiblockChecker == null) {
final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2);
final BlockPos downCenter = pos.method_10079(getFacing().getOpposite(), 2);
multiblockChecker = new MultiblockChecker(world, downCenter);
}
super.tick();

View file

@ -30,6 +30,7 @@ import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import reborncore.client.containerBuilder.IContainerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.containerBuilder.builder.ContainerBuilder;
@ -80,7 +81,7 @@ public class IndustrialGrinderBlockEntity extends GenericMachineBlockEntity impl
@Override
public void tick() {
if (multiblockChecker == null) {
final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2).down();
final BlockPos downCenter = pos.method_10079(getFacing().getOpposite(), 2).method_10079(Direction.DOWN, 1);
multiblockChecker = new MultiblockChecker(world, downCenter);
}

View file

@ -30,6 +30,7 @@ import net.minecraft.block.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import reborncore.client.containerBuilder.IContainerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.containerBuilder.builder.ContainerBuilder;
@ -80,7 +81,7 @@ public class IndustrialSawmillBlockEntity extends GenericMachineBlockEntity impl
@Override
public void tick() {
if (multiblockChecker == null) {
final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2).down();
final BlockPos downCenter = pos.method_10079(getFacing().getOpposite(), 2).method_10079(Direction.DOWN, 1);
multiblockChecker = new MultiblockChecker(world, downCenter);
}

View file

@ -26,6 +26,7 @@ package techreborn.blockentity.machine.multiblock;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import reborncore.client.containerBuilder.IContainerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.containerBuilder.builder.ContainerBuilder;
@ -71,7 +72,7 @@ public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implemen
@Override
public void cancelRemoval() {
super.cancelRemoval();
multiblockChecker = new MultiblockChecker(world, pos.down());
multiblockChecker = new MultiblockChecker(world, pos.method_10079(Direction.DOWN, 1));
}
// IContainerProvider

View file

@ -378,7 +378,7 @@ public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity
@Override
public void fromTag(CompoundTag tag) {
if (tag.containsKey("locked")) {
if (tag.contains("locked")) {
locked = tag.getBoolean("locked");
}
super.fromTag(tag);