Fix #1852
This commit is contained in:
parent
643436d129
commit
bfce163c99
2 changed files with 18 additions and 12 deletions
|
@ -30,6 +30,7 @@ import net.minecraft.util.math.BlockPos;
|
||||||
import reborncore.client.containerBuilder.IContainerProvider;
|
import reborncore.client.containerBuilder.IContainerProvider;
|
||||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||||
|
import reborncore.common.crafting.RebornRecipe;
|
||||||
import reborncore.common.recipes.RecipeCrafter;
|
import reborncore.common.recipes.RecipeCrafter;
|
||||||
import reborncore.common.util.RebornInventory;
|
import reborncore.common.util.RebornInventory;
|
||||||
import techreborn.blockentity.GenericMachineBlockEntity;
|
import techreborn.blockentity.GenericMachineBlockEntity;
|
||||||
|
@ -40,8 +41,6 @@ import techreborn.init.TRContent;
|
||||||
|
|
||||||
public class DistillationTowerBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
public class DistillationTowerBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MultiblockChecker multiblockChecker;
|
public MultiblockChecker multiblockChecker;
|
||||||
|
|
||||||
public DistillationTowerBlockEntity() {
|
public DistillationTowerBlockEntity() {
|
||||||
|
@ -74,10 +73,8 @@ public class DistillationTowerBlockEntity extends GenericMachineBlockEntity impl
|
||||||
final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2);
|
final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2);
|
||||||
multiblockChecker = new MultiblockChecker(world, downCenter);
|
multiblockChecker = new MultiblockChecker(world, downCenter);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!world.isClient && getMutliBlock()){
|
super.tick();
|
||||||
super.tick();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// IContainerProvider
|
// IContainerProvider
|
||||||
|
@ -88,4 +85,9 @@ public class DistillationTowerBlockEntity extends GenericMachineBlockEntity impl
|
||||||
.outputSlot(4, 119, 37).outputSlot(5, 139, 37).energySlot(6, 8, 72).syncEnergyValue().syncCrafterValue()
|
.outputSlot(4, 119, 37).outputSlot(5, 139, 37).energySlot(6, 8, 72).syncEnergyValue().syncCrafterValue()
|
||||||
.addInventory().create(this, syncID);
|
.addInventory().create(this, syncID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canCraft(RebornRecipe rebornRecipe) {
|
||||||
|
return getMutliBlock();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -29,13 +29,14 @@ import net.minecraft.util.math.BlockPos;
|
||||||
import reborncore.client.containerBuilder.IContainerProvider;
|
import reborncore.client.containerBuilder.IContainerProvider;
|
||||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||||
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
import reborncore.client.containerBuilder.builder.ContainerBuilder;
|
||||||
|
import reborncore.common.crafting.RebornRecipe;
|
||||||
import reborncore.common.recipes.RecipeCrafter;
|
import reborncore.common.recipes.RecipeCrafter;
|
||||||
import reborncore.common.util.RebornInventory;
|
import reborncore.common.util.RebornInventory;
|
||||||
|
import techreborn.blockentity.GenericMachineBlockEntity;
|
||||||
import techreborn.config.TechRebornConfig;
|
import techreborn.config.TechRebornConfig;
|
||||||
import techreborn.init.ModRecipes;
|
import techreborn.init.ModRecipes;
|
||||||
import techreborn.init.TRContent;
|
|
||||||
import techreborn.init.TRBlockEntities;
|
import techreborn.init.TRBlockEntities;
|
||||||
import techreborn.blockentity.GenericMachineBlockEntity;
|
import techreborn.init.TRContent;
|
||||||
|
|
||||||
public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity implements IContainerProvider {
|
||||||
|
|
||||||
|
@ -65,10 +66,8 @@ public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity im
|
||||||
if (multiblockChecker == null) {
|
if (multiblockChecker == null) {
|
||||||
multiblockChecker = new MultiblockChecker(world, pos.down(3));
|
multiblockChecker = new MultiblockChecker(world, pos.down(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!world.isClient && getMutliBlock()){
|
super.tick();
|
||||||
super.tick();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// IContainerProvider
|
// IContainerProvider
|
||||||
|
@ -78,4 +77,9 @@ public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity im
|
||||||
.blockEntity(this).slot(0, 50, 27).slot(1, 50, 47).outputSlot(2, 92, 36).outputSlot(3, 110, 36)
|
.blockEntity(this).slot(0, 50, 27).slot(1, 50, 47).outputSlot(2, 92, 36).outputSlot(3, 110, 36)
|
||||||
.energySlot(4, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
|
.energySlot(4, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canCraft(RebornRecipe rebornRecipe) {
|
||||||
|
return getMutliBlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue