Jump to content

[1.12] Help with Entitys


Big_Bad_E

Recommended Posts

Hello, My Name is Big_Bad_E, and I am working on making a mod where there is a Biped enemy, and when I do /summon Entity404 (Yes its a creepy pasta mod) It returns Unable to summon object.

My Entity Class

package Entity404.Entity;

import javax.annotation.Nullable;

import Entity404.entity404;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMoveThroughVillage;
import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWanderAvoidWater;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.ai.EntityAIZombieAttack;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.monster.EntityIronGolem;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.monster.EntityPigZombie;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.SoundEvents;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.World;
import net.minecraft.world.storage.loot.LootTableList;

public class Entity404 extends EntityMob {
	 public Entity404(World worldIn)
	    {
	        super(worldIn);
	        this.setSize(0.6F, 1.95F);
	    }

	    protected void initEntityAI()
	    {
	        this.tasks.addTask(0, new EntityAISwimming(this));
	        this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D));
	        this.tasks.addTask(7, new EntityAIWanderAvoidWater(this, 1.0D));
	        this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	        this.tasks.addTask(8, new EntityAILookIdle(this));
	        this.applyEntityAI();
	    }

	    protected void applyEntityAI()
	    {
	        this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] {EntityPigZombie.class}));
	        this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
	    }

	    protected void applyEntityAttributes()
	    {
	        super.applyEntityAttributes();
	        this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(35.0D);
	        this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.23000000417232513D);
	        this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(3.0D);
	    }

	    protected void entityInit()
	    {
	        super.entityInit();
	    }
	    protected int getExperiencePoints(EntityPlayer player)
	    {
	        this.experienceValue = (int)((float)this.experienceValue * 2.5F);
	        return super.getExperiencePoints(player);
	    }
	    //Entity Update
	    public void onLivingUpdate()
	    {
	        super.onLivingUpdate();
	    }
	    //When attacked
	    public boolean attackEntityFrom(DamageSource source, float amount)
	    {
	        if (super.attackEntityFrom(source, amount))
	        {
	            EntityLivingBase entitylivingbase = this.getAttackTarget();

	            if (entitylivingbase == null && source.getTrueSource() instanceof EntityLivingBase)
	            {
	                entitylivingbase = (EntityLivingBase)source.getTrueSource();
	            }
	        }
	        else
	        {
	            return false;
	        }
			return false;
	    }
	    protected SoundEvent getAmbientSound()
	    {
	        return SoundEvents.ENTITY_ZOMBIE_AMBIENT;
	    }

	    protected SoundEvent getHurtSound(DamageSource p_184601_1_)
	    {
	        return SoundEvents.ENTITY_ZOMBIE_HURT;
	    }

	    protected SoundEvent getDeathSound()
	    {
	        return SoundEvents.ENTITY_ZOMBIE_DEATH;
	    }

	    protected SoundEvent getStepSound()
	    {
	        return SoundEvents.ENTITY_ZOMBIE_STEP;
	    }

	    protected void playStepSound(BlockPos pos, Block blockIn)
	    {
	        this.playSound(this.getStepSound(), 0.15F, 1.0F);
	    }

	    /**
	     * Get this Entity's EnumCreatureAttribute
	     */
	    public EnumCreatureAttribute getCreatureAttribute()
	    {
	        return EnumCreatureAttribute.UNDEAD;
	    }
}

My Main Class

package Entity404;

import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import Entity404.Entity.Entity404;
import Entity404.Proxy.CommonProxy;

@Mod(modid = Referance.MODID, name = Referance.NAME, version = Referance.VERSION)
public class entity404 {
	@SidedProxy(clientSide = Referance.CLIENTPROXY, serverSide = Referance.COMMONPROXY)
	public static CommonProxy proxy;
	
	@EventHandler
	public void preInit(FMLPreInitializationEvent event) {
		proxy.preInit(event);
	}
	@EventHandler
	public void Init(FMLInitializationEvent event) {
		proxy.Init(event);
	}
	@EventHandler
	public void postInit(FMLPostInitializationEvent event) {
		proxy.postInit(event);
	}
}

 

I have searched though the Vanilla mob classes (Zombie, most of the entity code is copy pasted from there) and looked through the forge directory thing (Brain Fart) and I could not find out how!

Link to comment
Share on other sites

Hey my game is crashing when the mc tab opens. Here is the console log

2017-08-26 17:59:14,503 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-08-26 17:59:14,512 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[17:59:14] [main/INFO] [GradleStart]: Extra: []
[17:59:15] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/ethan/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[17:59:15] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[17:59:15] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[17:59:15] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[17:59:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[17:59:15] [main/INFO] [FML]: Forge Mod Loader version 14.21.1.2443 for Minecraft 1.12 loading
[17:59:15] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_131, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_131
[17:59:15] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[17:59:15] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin
[17:59:15] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin
[17:59:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[17:59:15] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[17:59:15] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[17:59:15] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[17:59:15] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[17:59:15] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[17:59:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[17:59:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[17:59:15] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
2017-08-26 17:59:16,397 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-08-26 17:59:17,281 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-08-26 17:59:17,285 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[17:59:21] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[17:59:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[17:59:21] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[17:59:24] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[17:59:24] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[17:59:24] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[17:59:24] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[17:59:26] [main/INFO]: Setting user: Player71
[17:59:38] [main/WARN]: Skipping bad option: lastServer:
[17:59:38] [main/INFO]: LWJGL Version: 2.9.4
[17:59:40] [main/INFO] [FML]: -- System Details --
Details:
	Minecraft Version: 1.12
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_131, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 752453224 bytes (717 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'Intel' Version: '4.4.0 - Build 20.19.15.4463' Renderer: 'Intel(R) HD Graphics 5500'
[17:59:40] [main/INFO] [FML]: MinecraftForge v14.21.1.2443 Initialized
[17:59:40] [main/INFO] [FML]: Replaced 921 ore ingredients
[17:59:41] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[17:59:41] [main/INFO] [FML]: Searching C:\Users\ethan\Desktop\Modding\run\mods for mods
[17:59:43] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 350818946 nanos
[17:59:47] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[17:59:48] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, entity303] at CLIENT
[17:59:48] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, entity303] at SERVER
[17:59:49] [main/ERROR] [FML]: An error occurred trying to load a proxy into proxy.java.lang.ClassNotFoundException: Entity404.Proxy.ClientProxy
[17:59:49] [main/FATAL] [FML]: Fatal errors were detected during the transition from CONSTRUCTING to PREINITIALIZATION. Loading cannot continue
[17:59:49] [main/FATAL] [FML]: 
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
	UC	minecraft{1.12} [Minecraft] (minecraft.jar) 
	UC	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
	UC	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.12-14.21.1.2443.jar) 
	UC	forge{14.21.1.2443} [Minecraft Forge] (forgeSrc-1.12-14.21.1.2443.jar) 
	UE	entity303{666} [Entity303] (bin) 
[17:59:49] [main/FATAL] [FML]: The following problems were captured during this phase
[17:59:49] [main/ERROR] [FML]: Caught exception from entity303 (net.minecraftforge.fml.common.LoaderException: java.lang.ClassNotFoundException: Entity404.Proxy.ClientProxy)
[17:59:49] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:630]: ---- Minecraft Crash Report ----
// I feel sad now :(

Time: 8/26/17 5:59 PM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Entity303 (entity303)
Caused by: net.minecraftforge.fml.common.LoaderException: java.lang.ClassNotFoundException: Entity404.Proxy.ClientProxy
	at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:102)
	at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:593)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:252)
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:230)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:147)
	at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:570)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:227)
	at net.minecraft.client.Minecraft.init(Minecraft.java:508)
	at net.minecraft.client.Minecraft.run(Minecraft.java:416)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)
Caused by: java.lang.ClassNotFoundException: Entity404.Proxy.ClientProxy
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:75)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:85)
	... 43 more
Caused by: java.lang.NullPointerException
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
	... 49 more


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
	Minecraft Version: 1.12
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_131, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 827026072 bytes (788 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.40 Powered by Forge 14.21.1.2443 5 mods loaded, 5 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
	UC	minecraft{1.12} [Minecraft] (minecraft.jar) 
	UC	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
	UC	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.12-14.21.1.2443.jar) 
	UC	forge{14.21.1.2443} [Minecraft Forge] (forgeSrc-1.12-14.21.1.2443.jar) 
	UE	entity303{666} [Entity303] (bin) 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'Intel' Version: '4.4.0 - Build 20.19.15.4463' Renderer: 'Intel(R) HD Graphics 5500'
[17:59:49] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:630]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\ethan\Desktop\Modding\run\.\crash-reports\crash-2017-08-26_17.59.49-client.txt

I will show you any class you need to see to help.

Link to comment
Share on other sites

Still can't /summon the entity, don't know if I should make a separate thread because of the length

Render Class

package Entity303.Entity;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
import Entity303.Referance;

public class RenderEntity303 extends RenderLiving
{
    protected ResourceLocation Entity303Texture;

    public RenderEntity303(RenderManager renderManager, ModelBase par1ModelBase, float parShadowSize)
    {
        super(renderManager, par1ModelBase, parShadowSize);
        setEntityTexture();        
    }
 
    @Override
    protected void preRenderCallback(EntityLivingBase entity, float f)
    {
        preRenderCallbackEntity303((Entity303) entity, f);
    }
  
    protected void preRenderCallbackEntity303(Entity303 entity, float f)
    {
        // some people do some G11 transformations or blends here, like you can do
        // GL11.glScalef(2F, 2F, 2F); to scale up the entity
        // which is used for Slime entities.  I suggest having the entity cast to
        // your custom type to make it easier to access fields from your 
        // custom entity, eg. GL11.glScalef(entity.scaleFactor, entity.scaleFactor, 
        // entity.scaleFactor); 
    }

    protected void setEntityTexture()
    {
        Entity303Texture = new ResourceLocation(Referance.MODID+":textures/entity/Entity303.png");
    }

    /**
    * Returns the location of an entity's texture. Doesn't seem to be called 
    * unless you call Render.bindEntityTexture.
    */
    @Override
    protected ResourceLocation getEntityTexture(Entity par1Entity)
    {
        return Entity303Texture;
    }
}

Entity Class

package Entity303.Entity;

import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWanderAvoidWater;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.monster.EntityPigZombie;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class Entity303 extends EntityMob {
	
	 public Entity303(World worldIn)
	    {
	        super(worldIn);
	        this.setSize(0.6F, 1.95F);
	    }

	    protected void initEntityAI()
	    {
	        this.tasks.addTask(0, new EntityAISwimming(this));
	        this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D));
	        this.tasks.addTask(7, new EntityAIWanderAvoidWater(this, 1.0D));
	        this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	        this.tasks.addTask(8, new EntityAILookIdle(this));
	        this.applyEntityAI();
	    }

	    protected void applyEntityAI()
	    {
	        this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] {EntityPigZombie.class}));
	        this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
	    }

	    protected void applyEntityAttributes()
	    {
	        super.applyEntityAttributes();
	        this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(35.0D);
	        this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.23000000417232513D);
	        this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(3.0D);
	    }

	    protected void entityInit()
	    {
	        super.entityInit();
	    }
	    protected int getExperiencePoints(EntityPlayer player)
	    {
	        this.experienceValue = (int)((float)this.experienceValue * 2.5F);
	        return super.getExperiencePoints(player);
	    }
	    //Entity Update
	    public void onLivingUpdate()
	    {
	        super.onLivingUpdate();
	    }
	    //When attacked
	    public boolean attackEntityFrom(DamageSource source, float amount)
	    {
	        if (super.attackEntityFrom(source, amount))
	        {
	            EntityLivingBase entitylivingbase = this.getAttackTarget();

	            if (entitylivingbase == null && source.getTrueSource() instanceof EntityLivingBase)
	            {
	                entitylivingbase = (EntityLivingBase)source.getTrueSource();
	            }
	        }
	        else
	        {
	            return false;
	        }
			return false;
	    }
	    protected SoundEvent getAmbientSound()
	    {
	        return SoundEvents.ENTITY_ZOMBIE_AMBIENT;
	    }

	    protected SoundEvent getHurtSound(DamageSource p_184601_1_)
	    {
	        return SoundEvents.ENTITY_ZOMBIE_HURT;
	    }

	    protected SoundEvent getDeathSound()
	    {
	        return SoundEvents.ENTITY_ZOMBIE_DEATH;
	    }

	    protected SoundEvent getStepSound()
	    {
	        return SoundEvents.ENTITY_ZOMBIE_STEP;
	    }

	    protected void playStepSound(BlockPos pos, Block blockIn)
	    {
	        this.playSound(this.getStepSound(), 0.15F, 1.0F);
	    }

	    /**
	     * Get this Entity's EnumCreatureAttribute
	     */
	    public EnumCreatureAttribute getCreatureAttribute()
	    {
	        return EnumCreatureAttribute.UNDEAD;
	    }
	    public void onDeath(DamageSource cause)
	    {
	        super.onDeath(cause);

	        if (cause.getTrueSource() instanceof EntityPlayer)
	        {
	            EntityPlayer player = (EntityPlayer)cause.getTrueSource();
	            ItemStack itemstack = this.getSkullDrop();
	        }
	    }
	    protected ItemStack getSkullDrop()
	    {
	        return new ItemStack(Items.SKULL, 1, 2);
	    }
}

Model Class

package Entity303.Entity;

import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.util.math.MathHelper;

public class ModelEntity303 extends ModelBiped {
	 public ModelEntity303()
	    {
	        this(0.0F, false);
	    }

	    public ModelEntity303(float modelSize, boolean p_i1168_2_)
	    {
	        super(modelSize, 0.0F, 64, p_i1168_2_ ? 32 : 64);
	    }

	    /**
	     * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
	     * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
	     * "far" arms and legs can swing at most.
	     */
	    public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
	    {
	        super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
	        boolean flag = entityIn instanceof EntityZombie && ((EntityZombie)entityIn).isArmsRaised();
	        float f = MathHelper.sin(this.swingProgress * (float)Math.PI);
	        float f1 = MathHelper.sin((1.0F - (1.0F - this.swingProgress) * (1.0F - this.swingProgress)) * (float)Math.PI);
	        this.bipedRightArm.rotateAngleZ = 0.0F;
	        this.bipedLeftArm.rotateAngleZ = 0.0F;
	        this.bipedRightArm.rotateAngleY = -(0.1F - f * 0.6F);
	        this.bipedLeftArm.rotateAngleY = 0.1F - f * 0.6F;
	        float f2 = -(float)Math.PI / (flag ? 1.5F : 2.25F);
	        this.bipedRightArm.rotateAngleX = f2;
	        this.bipedLeftArm.rotateAngleX = f2;
	        this.bipedRightArm.rotateAngleX += f * 1.2F - f1 * 0.4F;
	        this.bipedLeftArm.rotateAngleX += f * 1.2F - f1 * 0.4F;
	        this.bipedRightArm.rotateAngleZ += MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
	        this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
	        this.bipedRightArm.rotateAngleX += MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
	        this.bipedLeftArm.rotateAngleX -= MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
	    }
}

Main Class

package Entity303;

import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import Entity303.Proxy.CommonProxy;

@Mod(modid = Referance.MODID, name = Referance.NAME, version = Referance.VERSION)
public class entity303 {
	@SidedProxy(clientSide = Referance.CLIENTPROXY, serverSide = Referance.COMMONPROXY)
	public static CommonProxy proxy;
	
	@EventHandler
	public void preInit(FMLPreInitializationEvent event) {
		proxy.preInit(event);
	}
	@EventHandler
	public void Init(FMLInitializationEvent event) {
		proxy.Init(event);
	}
	@EventHandler
	public void postInit(FMLPostInitializationEvent event) {
		proxy.postInit(event);
	}
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • where opportunities abound and promises of financial prosperity beckon from every corner of the internet, the line between opportunity and deception becomes increasingly blurred. As a 38-year-old single mom, I embarked on a journey into the world of cryptocurrency investing, hoping to secure a brighter future for myself and my family. Little did I know, this journey would lead me down a treacherous path fraught with deception and heartbreak. My foray into cryptocurrency investing began with the promise of lucrative returns from a platform claiming to operate within Europe and South Asia. Blinded by optimism and the allure of financial gain, I entrusted my hard-earned savings to this fraudulent company, believing wholeheartedly in its legitimacy. However, my hopes were dashed when I began encountering difficulties with withdrawals and found myself entangled in a web of exorbitant fees and dubious practices. In a desperate bid to salvage what remained of my investment, I turned to a recovery company recommended to me by the very platform that had deceived me. Yet, even in my darkest hour, the deceit persisted, as I soon discovered that the company tasked with recovering my funds was complicit in the deception. Faced with the crushing realization that I had been betrayed once again, I felt a sense of hopelessness engulf me. It was in this moment of despair that I stumbled upon Lee Ultimate Hacker – a shining beacon of hope amidst the darkness of deception. Through a stroke of luck, I came across a blog post singing the praises of this remarkable team, and I knew I had found my savior. With nothing left to lose and everything to gain, I reached out to them, hoping against hope for a chance at redemption. From the outset, Lee Ultimate Hacker proved to be a guiding light in my journey toward financial recovery. Their professionalism, expertise, and unwavering commitment to client satisfaction set them apart from the myriad of recovery services in the digital sphere. With empathy and understanding, they listened to my story and embarked on a mission to reclaim what was rightfully mine. Through their diligent efforts and meticulous attention to detail, Lee Ultimate Hacker succeeded where others had failed, restoring a sense of hope and security in the wake of betrayal. Their dedication to justice and unwavering determination to deliver results ensured that I emerged from the ordeal stronger and more resilient than ever before. Throughout the recovery process, their team remained accessible, transparent, and supportive, offering guidance and reassurance every step of the way. To anyone grappling with devastating financial fraud, I offer a lifeline of hope – trust in Lee Ultimate Hacker to guide you through the storm with expertise and compassion. In a world rife with deception and uncertainty, they stand as a beacon of reliability and trustworthiness, ready to lead you toward financial restitution and a brighter future. If you find yourself in a similar predicament, do not hesitate to reach out to Lee Ultimate Hacker.AT LEEULTIMATEHACKER@ AOL. COM   Support @ leeultimatehacker . com.  telegram:LEEULTIMATE   wh@tsapp +1  (715) 314  -  9248  https://leeultimatehacker.com
    • Sorry, this is the report https://paste.ee/p/OeDj1
    • Please share a link to your crash report on https://paste.ee, as explained in the FAQ
    • This is the crash report [User dumped their crash report directly in their thread, triggering the anti-spam]  
    • Add the crash-report or latest.log (logs-folder) with sites like https://paste.ee/ and paste the link to it here  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.