mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
Fix pool's north wall being slightly taller, Fix pump item model
This commit is contained in:
3 files changed
+23
-6
No files matched your search
@@ -309,6 +309,7 @@ public final class ModelHandler {
|
||||
registerItemModel(ModBlocks.manaVoid);
|
||||
registerItemModel(ModBlocks.prism);
|
||||
registerItemModel(ModBlocks.pistonRelay);
|
||||
registerItemModel(ModBlocks.pump);
|
||||
registerItemModel(ModBlocks.redStringComparator);
|
||||
registerItemModel(ModBlocks.redStringContainer);
|
||||
registerItemModel(ModBlocks.redStringDispenser);
|
||||
|
||||
@@ -146,7 +146,7 @@ public class BlockPool extends BlockMod implements IWandHUD, IWandable, ILexicon
|
||||
|
||||
private static final AxisAlignedBB BOTTOM_AABB = new AxisAlignedBB(0, 0, 0, 1, 1/16.0, 1);
|
||||
private static final AxisAlignedBB NORTH_AABB = new AxisAlignedBB(0, 0, 15/16.0, 1, 0.5, 1);
|
||||
private static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0, 0, 0, 1, 0.7, 1/16.0);
|
||||
private static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0, 0, 0, 1, 0.5, 1/16.0);
|
||||
private static final AxisAlignedBB WEST_AABB = new AxisAlignedBB(0, 0, 0, 1/16.0, 0.5, 1);
|
||||
private static final AxisAlignedBB EAST_AABB = new AxisAlignedBB(15/16.0, 0, 0, 1, 0.5, 1);
|
||||
|
||||
|
||||
@@ -15,8 +15,11 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.ModelLoaderRegistry;
|
||||
import net.minecraftforge.client.model.animation.Animation;
|
||||
import net.minecraftforge.common.animation.TimeValues;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.model.animation.CapabilityAnimation;
|
||||
import net.minecraftforge.common.model.animation.IAnimationStateMachine;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -35,21 +38,34 @@ public class TilePump extends TileMod {
|
||||
|
||||
public int comparator;
|
||||
public boolean hasRedstone = false;
|
||||
int lastComparator = 0;
|
||||
private int lastComparator = 0;
|
||||
|
||||
private final TimeValues.VariableValue move;
|
||||
//private final IAnimationStateMachine asm;
|
||||
private final IAnimationStateMachine asm;
|
||||
|
||||
public TilePump() {
|
||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
||||
move = new TimeValues.VariableValue(0); //todo 1.9
|
||||
//asm = Animation.INSTANCE.load(new ResourceLocation("botania", "asms/block/pump.json"), ImmutableMap.of("move", move));
|
||||
move = new TimeValues.VariableValue(0);
|
||||
asm = ModelLoaderRegistry.loadASM(new ResourceLocation("botania", "asms/block/pump.json"), ImmutableMap.of("move", move));
|
||||
} else {
|
||||
move = null;
|
||||
//asm = null;
|
||||
asm = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCapability(Capability<?> cap, EnumFacing side) {
|
||||
return cap == CapabilityAnimation.ANIMATION_CAPABILITY || super.hasCapability(cap, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getCapability(Capability<T> cap, EnumFacing side) {
|
||||
if (cap == CapabilityAnimation.ANIMATION_CAPABILITY) {
|
||||
return CapabilityAnimation.ANIMATION_CAPABILITY.cast(asm);
|
||||
}
|
||||
return super.getCapability(cap, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
hasRedstone = false;
|
||||
|
||||
Reference in new issue
Block a user