2015-11-16 03:50:54 +00:00
|
|
|
package net.minecraftforge.debug;
|
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
import java.io.IOException;
|
|
|
|
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.block.BlockPistonBase;
|
|
|
|
import net.minecraft.block.material.Material;
|
|
|
|
import net.minecraft.block.properties.IProperty;
|
|
|
|
import net.minecraft.block.properties.PropertyDirection;
|
|
|
|
import net.minecraft.block.state.IBlockState;
|
2016-01-01 15:15:48 +00:00
|
|
|
import net.minecraft.client.renderer.entity.Render;
|
|
|
|
import net.minecraft.client.renderer.entity.RenderLiving;
|
|
|
|
import net.minecraft.client.renderer.entity.RenderManager;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraft.client.renderer.texture.TextureMap;
|
2016-03-01 12:58:03 +00:00
|
|
|
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraft.creativetab.CreativeTabs;
|
2016-01-01 15:15:48 +00:00
|
|
|
import net.minecraft.entity.EntityLiving;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraft.entity.EntityLivingBase;
|
2016-01-01 15:15:48 +00:00
|
|
|
import net.minecraft.entity.SharedMonsterAttributes;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
2016-03-01 12:58:03 +00:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraft.util.EnumFacing;
|
2016-01-01 15:15:48 +00:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2015-11-23 07:12:01 +00:00
|
|
|
import net.minecraft.world.IBlockAccess;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraft.world.World;
|
2016-01-01 15:15:48 +00:00
|
|
|
import net.minecraftforge.client.model.IModel;
|
|
|
|
import net.minecraftforge.client.model.IModelState;
|
|
|
|
import net.minecraftforge.client.model.IRetexturableModel;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraftforge.client.model.ModelLoader;
|
2016-01-01 15:15:48 +00:00
|
|
|
import net.minecraftforge.client.model.ModelLoaderRegistry;
|
|
|
|
import net.minecraftforge.client.model.MultiModel;
|
|
|
|
import net.minecraftforge.client.model.TRSRTransformation;
|
|
|
|
import net.minecraftforge.client.model.animation.Animation;
|
|
|
|
import net.minecraftforge.client.model.animation.AnimationModelBase;
|
|
|
|
import net.minecraftforge.client.model.animation.AnimationTESR;
|
|
|
|
import net.minecraftforge.client.model.animation.Event;
|
|
|
|
import net.minecraftforge.client.model.animation.IAnimationProvider;
|
|
|
|
import net.minecraftforge.client.model.animation.ITimeValue;
|
|
|
|
import net.minecraftforge.client.model.animation.TimeValues.VariableValue;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraftforge.client.model.b3d.B3DLoader;
|
2016-01-01 15:15:48 +00:00
|
|
|
import net.minecraftforge.client.model.pipeline.VertexLighterSmoothAo;
|
|
|
|
import net.minecraftforge.common.model.animation.IAnimationStateMachine;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraftforge.common.property.ExtendedBlockState;
|
|
|
|
import net.minecraftforge.common.property.IUnlistedProperty;
|
2016-01-01 15:15:48 +00:00
|
|
|
import net.minecraftforge.common.property.Properties;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
2016-01-01 15:15:48 +00:00
|
|
|
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
|
|
|
import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraftforge.fml.common.Mod;
|
|
|
|
import net.minecraftforge.fml.common.Mod.EventHandler;
|
2016-01-01 15:15:48 +00:00
|
|
|
import net.minecraftforge.fml.common.Mod.Instance;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraftforge.fml.common.SidedProxy;
|
|
|
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
2016-01-01 15:15:48 +00:00
|
|
|
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
2015-11-16 03:50:54 +00:00
|
|
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
import org.apache.commons.lang3.tuple.Pair;
|
|
|
|
|
|
|
|
import com.google.common.collect.ImmutableMap;
|
2015-11-16 03:50:54 +00:00
|
|
|
|
|
|
|
@Mod(modid = ModelAnimationDebug.MODID, version = ModelAnimationDebug.VERSION)
|
|
|
|
public class ModelAnimationDebug
|
|
|
|
{
|
|
|
|
public static final String MODID = "forgedebugmodelanimation";
|
|
|
|
public static final String VERSION = "0.0";
|
|
|
|
|
|
|
|
public static String blockName = "test_animation_block";
|
|
|
|
public static final PropertyDirection FACING = PropertyDirection.create("facing");
|
2016-01-01 15:15:48 +00:00
|
|
|
|
|
|
|
@Instance(MODID)
|
|
|
|
public static ModelAnimationDebug instance;
|
2015-11-16 03:50:54 +00:00
|
|
|
|
2016-01-02 06:59:14 +00:00
|
|
|
@SidedProxy
|
2015-11-16 03:50:54 +00:00
|
|
|
public static CommonProxy proxy;
|
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
public static abstract class CommonProxy
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
|
|
|
public void preInit(FMLPreInitializationEvent event)
|
|
|
|
{
|
|
|
|
GameRegistry.registerBlock(new Block(Material.wood)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
setCreativeTab(CreativeTabs.tabBlock);
|
|
|
|
setUnlocalizedName(MODID + "." + blockName);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ExtendedBlockState createBlockState()
|
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
return new ExtendedBlockState(this, new IProperty[]{ FACING, Properties.StaticProperty }, new IUnlistedProperty[]{ Properties.AnimationProperty });
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isOpaqueCube() { return false; }
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isFullCube() { return false; }
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public IBlockState onBlockPlaced(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
|
|
|
{
|
|
|
|
return this.getDefaultState().withProperty(FACING, BlockPistonBase.getFacingFromEntity(world, pos, placer));
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public IBlockState getStateFromMeta(int meta) {
|
|
|
|
return getDefaultState().withProperty(FACING, EnumFacing.getFront(meta));
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getMetaFromState(IBlockState state) {
|
|
|
|
return ((EnumFacing)state.getValue(FACING)).getIndex();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean hasTileEntity(IBlockState state) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TileEntity createTileEntity(World world, IBlockState state) {
|
2016-01-01 15:15:48 +00:00
|
|
|
return new Chest();
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
|
2015-11-23 07:12:01 +00:00
|
|
|
@Override
|
|
|
|
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
2016-01-01 15:15:48 +00:00
|
|
|
return state.withProperty(Properties.StaticProperty, true);
|
2015-11-23 07:12:01 +00:00
|
|
|
}
|
|
|
|
|
2015-11-16 03:50:54 +00:00
|
|
|
/*@Override
|
|
|
|
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
|
|
|
TileEntity te = world.getTileEntity(pos);
|
|
|
|
if(te instanceof Chest && state instanceof IExtendedBlockState)
|
|
|
|
{
|
|
|
|
return ((Chest)te).getState((IExtendedBlockState)state);
|
|
|
|
}
|
|
|
|
return super.getExtendedState(state, world, pos);
|
|
|
|
}*/
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
|
|
|
|
{
|
|
|
|
if(world.isRemote)
|
|
|
|
{
|
|
|
|
TileEntity te = world.getTileEntity(pos);
|
|
|
|
if(te instanceof Chest)
|
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
((Chest)te).click(player.isSneaking());
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
}
|
2016-01-01 15:15:48 +00:00
|
|
|
return true;
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
}, blockName);
|
2016-01-01 15:15:48 +00:00
|
|
|
GameRegistry.registerTileEntity(Chest.class, MODID + ":" + "tile_" + blockName);
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
public abstract IAnimationStateMachine load(ResourceLocation location, ImmutableMap<String, ITimeValue> parameters);
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
public static class ServerProxy extends CommonProxy
|
|
|
|
{
|
|
|
|
public IAnimationStateMachine load(ResourceLocation location, ImmutableMap<String, ITimeValue> parameters)
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
2016-01-02 06:59:14 +00:00
|
|
|
|
2015-11-16 03:50:54 +00:00
|
|
|
public static class ClientProxy extends CommonProxy
|
|
|
|
{
|
|
|
|
@Override
|
|
|
|
public void preInit(FMLPreInitializationEvent event)
|
|
|
|
{
|
|
|
|
super.preInit(event);
|
2015-11-30 19:14:33 +00:00
|
|
|
B3DLoader.instance.addDomain(MODID);
|
2015-11-16 03:50:54 +00:00
|
|
|
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(GameRegistry.findBlock(MODID, blockName)), 0, new ModelResourceLocation(MODID.toLowerCase() + ":" + blockName, "inventory"));
|
2016-01-01 15:15:48 +00:00
|
|
|
ClientRegistry.bindTileEntitySpecialRenderer(Chest.class, new AnimationTESR<Chest>()
|
|
|
|
{
|
|
|
|
@Override
|
|
|
|
public void handleEvents(Chest chest, float time, Iterable<Event> pastEvents)
|
|
|
|
{
|
|
|
|
chest.handleEvents(time, pastEvents);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
String entityName = MODID + ":entity_chest";
|
|
|
|
//EntityRegistry.registerGlobalEntityID(EntityChest.class, entityName, EntityRegistry.findGlobalUniqueEntityId());
|
|
|
|
EntityRegistry.registerModEntity(EntityChest.class, entityName, 0, ModelAnimationDebug.instance, 64, 20, true, 0xFFAAAA00, 0xFFDDDD00);
|
|
|
|
RenderingRegistry.registerEntityRenderingHandler(EntityChest.class, new IRenderFactory<EntityChest>()
|
|
|
|
{
|
|
|
|
public Render<EntityChest> createRenderFor(RenderManager manager)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
/*model = ModelLoaderRegistry.getModel(new ResourceLocation(ModelLoaderRegistryDebug.MODID, "block/chest.b3d"));
|
|
|
|
if(model instanceof IRetexturableModel)
|
|
|
|
{
|
|
|
|
model = ((IRetexturableModel)model).retexture(ImmutableMap.of("#chest", "entity/chest/normal"));
|
|
|
|
}
|
|
|
|
if(model instanceof IModelCustomData)
|
|
|
|
{
|
|
|
|
model = ((IModelCustomData)model).process(ImmutableMap.of("mesh", "[\"Base\", \"Lid\"]"));
|
|
|
|
}*/
|
|
|
|
IModel base = ModelLoaderRegistry.getModel(new ResourceLocation(ModelAnimationDebug.MODID, "block/engine"));
|
|
|
|
IModel ring = ModelLoaderRegistry.getModel(new ResourceLocation(ModelAnimationDebug.MODID, "block/engine_ring"));
|
|
|
|
ImmutableMap<String, String> textures = ImmutableMap.of(
|
|
|
|
"base", "blocks/stone",
|
|
|
|
"front", "blocks/log_oak",
|
|
|
|
"chamber", "blocks/redstone_block",
|
|
|
|
"trunk", "blocks/end_stone"
|
|
|
|
);
|
|
|
|
if(base instanceof IRetexturableModel)
|
|
|
|
{
|
|
|
|
base = ((IRetexturableModel)base).retexture(textures);
|
|
|
|
}
|
|
|
|
if(ring instanceof IRetexturableModel)
|
|
|
|
{
|
|
|
|
ring = ((IRetexturableModel)ring).retexture(textures);
|
|
|
|
}
|
|
|
|
IModel model = new MultiModel(
|
|
|
|
new ResourceLocation(ModelAnimationDebug.MODID, "builtin/engine"),
|
|
|
|
ring,
|
|
|
|
TRSRTransformation.identity(),
|
|
|
|
ImmutableMap.of(
|
|
|
|
"base", Pair.<IModel, IModelState>of(base, TRSRTransformation.identity())
|
|
|
|
)
|
|
|
|
);
|
|
|
|
return new RenderLiving<EntityChest>(manager, new AnimationModelBase<EntityChest>(model, new VertexLighterSmoothAo())
|
|
|
|
{
|
|
|
|
@Override
|
|
|
|
public void handleEvents(EntityChest chest, float time, Iterable<Event> pastEvents)
|
|
|
|
{
|
|
|
|
chest.handleEvents(time, pastEvents);
|
|
|
|
}
|
|
|
|
}, 0.5f)
|
|
|
|
{
|
|
|
|
protected ResourceLocation getEntityTexture(EntityChest entity)
|
|
|
|
{
|
|
|
|
return TextureMap.locationBlocksTexture;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
catch(IOException e)
|
|
|
|
{
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
public IAnimationStateMachine load(ResourceLocation location, ImmutableMap<String, ITimeValue> parameters)
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
return Animation.INSTANCE.load(location, parameters);
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
2016-01-01 15:15:48 +00:00
|
|
|
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@EventHandler
|
|
|
|
public void preInit(FMLPreInitializationEvent event) { proxy.preInit(event); }
|
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
public static class Chest extends TileEntity implements IAnimationProvider
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
private final IAnimationStateMachine asm;
|
|
|
|
private final VariableValue cycleLength = new VariableValue(4);
|
|
|
|
private final VariableValue clickTime = new VariableValue(Float.NEGATIVE_INFINITY);
|
|
|
|
//private final VariableValue offset = new VariableValue(0);
|
|
|
|
|
|
|
|
public Chest() {
|
|
|
|
/*asm = proxy.load(new ResourceLocation(MODID.toLowerCase(), "asms/block/chest.json"), ImmutableMap.<String, ITimeValue>of(
|
|
|
|
"click_time", clickTime
|
|
|
|
));*/
|
|
|
|
asm = proxy.load(new ResourceLocation(MODID.toLowerCase(), "asms/block/engine.json"), ImmutableMap.<String, ITimeValue>of(
|
|
|
|
"cycle_length", cycleLength,
|
|
|
|
"click_time", clickTime
|
|
|
|
//"offset", offset
|
|
|
|
));
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
public void handleEvents(float time, Iterable<Event> pastEvents)
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
for(Event event : pastEvents)
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
System.out.println("Event: " + event.event() + " " + event.offset() + " " + getPos() + " " + time);
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-01-01 15:15:48 +00:00
|
|
|
public boolean hasFastRenderer()
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*public IExtendedBlockState getState(IExtendedBlockState state) {
|
|
|
|
return state.withProperty(B3DFrameProperty.instance, curState);
|
|
|
|
}*/
|
|
|
|
|
|
|
|
public void click(boolean sneaking)
|
|
|
|
{
|
|
|
|
if(asm != null)
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
if(sneaking)
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
cycleLength.setValue(6 - cycleLength.apply(0));
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
2016-01-01 15:15:48 +00:00
|
|
|
/*else if(asm.currentState().equals("closed"))
|
|
|
|
{
|
|
|
|
clickTime.setValue(Animation.getWorldTime(getWorld()));
|
|
|
|
asm.transition("opening");
|
|
|
|
}
|
|
|
|
else if(asm.currentState().equals("open"))
|
|
|
|
{
|
|
|
|
clickTime.setValue(Animation.getWorldTime(getWorld()));
|
|
|
|
asm.transition("closing");
|
|
|
|
}*/
|
|
|
|
else if(asm.currentState().equals("default"))
|
|
|
|
{
|
2016-01-25 14:39:43 +00:00
|
|
|
float time = Animation.getWorldTime(getWorld(), Animation.getPartialTickTime());
|
2016-01-01 15:15:48 +00:00
|
|
|
clickTime.setValue(time);
|
|
|
|
//offset.setValue(time);
|
|
|
|
//asm.transition("moving");
|
|
|
|
asm.transition("starting");
|
|
|
|
}
|
|
|
|
else if(asm.currentState().equals("moving"))
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-25 14:39:43 +00:00
|
|
|
clickTime.setValue(Animation.getWorldTime(getWorld(), Animation.getPartialTickTime()));
|
2016-01-01 15:15:48 +00:00
|
|
|
asm.transition("stopping");
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
public IAnimationStateMachine asm()
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
return asm;
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
public static class EntityChest extends EntityLiving implements IAnimationProvider
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
private final IAnimationStateMachine asm;
|
|
|
|
private VariableValue cycleLength;
|
2015-11-16 03:50:54 +00:00
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
public EntityChest(World world)
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
super(world);
|
|
|
|
setSize(1, 1);
|
|
|
|
if(cycleLength == null)
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
cycleLength = new VariableValue(getHealth() / 5);
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
2016-01-01 15:15:48 +00:00
|
|
|
asm = proxy.load(new ResourceLocation(MODID.toLowerCase(), "asms/block/engine.json"), ImmutableMap.<String, ITimeValue>of(
|
|
|
|
"cycle_length", cycleLength
|
|
|
|
));
|
|
|
|
}
|
2015-11-16 03:50:54 +00:00
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
public void handleEvents(float time, Iterable<Event> pastEvents)
|
|
|
|
{
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
}
|
2015-11-16 03:50:54 +00:00
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
public IAnimationStateMachine asm()
|
|
|
|
{
|
|
|
|
return asm;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onDataWatcherUpdate(int id)
|
|
|
|
{
|
|
|
|
super.onDataWatcherUpdate(id);
|
|
|
|
if(id == 6) // health
|
2015-11-16 03:50:54 +00:00
|
|
|
{
|
2016-01-01 15:15:48 +00:00
|
|
|
if(cycleLength == null)
|
|
|
|
{
|
|
|
|
cycleLength = new VariableValue(0);
|
|
|
|
}
|
|
|
|
cycleLength.setValue(getHealth() / 5);
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
2016-01-01 15:15:48 +00:00
|
|
|
}
|
2015-11-16 03:50:54 +00:00
|
|
|
|
2016-01-01 15:15:48 +00:00
|
|
|
@Override
|
|
|
|
protected void applyEntityAttributes()
|
|
|
|
{
|
|
|
|
super.applyEntityAttributes();
|
|
|
|
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(60);
|
2015-11-16 03:50:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|