Jump to content

Criminox

Members
  • Posts

    38
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Criminox's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So I am making a custom zombie mob for my mod and I have got the error stated in the title. I'll provide the code below but it isn't fully complete as of yet. Any ideas? package com.crim.parallelworlds.entities; import com.crim.parallelworlds.Ref; 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.EntityAIWander; import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.ai.EntityAIZombieAttack; import net.minecraft.entity.monster.EntityIronGolem; 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.network.datasync.DataParameter; import net.minecraft.network.datasync.DataSerializers; import net.minecraft.network.datasync.EntityDataManager; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class CelestialZombie extends EntityZombie{ public static final DataParameter<Boolean> ARMS_RAISED = EntityDataManager.createKey(CelestialZombie.class, DataSerializers.BOOLEAN); public static final ResourceLocation LOOT = new ResourceLocation(Ref.MODID, "entities/celestial_zombie"); public CelestialZombie(World worldIn){ super(worldIn); setSize(0.6F, 1.95F); } @Override protected void entityInit(){ super.entityInit(); this.getDataManager().register(ARMS_RAISED, Boolean.valueOf(false)); } @Override protected void applyEntityAttributes(){ super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(35.0D); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.13D); this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(0.5D); this.getEntityAttribute(SharedMonsterAttributes.ARMOR).setBaseValue(4.0D); } public void setArmsRaised(boolean armsRaised){ this.getDataManager().set(ARMS_RAISED, Boolean.valueOf(armsRaised)); } @SideOnly(Side.CLIENT) public boolean isArmsRaised(){ return this.getDataManager().get(ARMS_RAISED).booleanValue(); } @Override protected void initEntityAI(){ this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAIZombieAttack(this, 1.0D, false)); this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D)); this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(8, new EntityAILookIdle(this)); this.applyEntityAI(); } private void applyEntityAI(){ this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[]{EntityPigZombie.class})); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityVillager.class, false)); this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityIronGolem.class, true)); } }
  2. oh bugger, i knew i missed something haha thank you
  3. This is my code public static final DimensionType DREAM_WORLD = DimensionType.register("DREAMWORLD", "_dream", ParallelWorldsMain.dimID, DreamWorldProvider.class, false); And I get this error The method register(String, String, int, Class<? extends WorldProvider>, boolean) in the type DimensionType is not applicable for the arguments (String, String, int, Class<DreamWorldProvider>, boolean) Im not totally sure what to do here because as far as im aware from my coding experience in this past that this was correct? Any tips?
  4. What exactly do I put in that method? I thought you just used it to initialize the generateOre used in generateOverworld
  5. So I've tried several different methods to try to find my ore in game after the world has been created so first and foremost I wanna know if I have gone wrong somewhere and if so can you please spot it because im not sure myself. here's the code. package com.crim.parallelworlds.world; import java.util.Random; import com.crim.parallelworlds.handlers.BlockHandler; import net.minecraft.block.state.IBlockState; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.chunk.IChunkProvider; import net.minecraftforge.fml.common.IWorldGenerator; public class OreGen implements IWorldGenerator{ @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider){ if(world.provider.getDimension() == 0){ generateOverworld(random, chunkX, chunkZ, world, chunkGenerator, chunkProvider); } } private void generateOverworld(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider){ generateOre(BlockHandler.nightOre.getDefaultState(), world, random, chunkX * 16, chunkZ * 16, 1, 40, 4 + random.nextInt(4), 12); } private void generateOre(IBlockState ore, World world, Random random, int x, int z, int minY, int maxY, int size, int chance){ } } In my preInit method GameRegistry.registerWorldGenerator(new OreGen(), 3);
  6. Also do you know of a quick way to see if the block is actually spawning instead of having to look around for it?
  7. Does anyone know the individual ore chance spawn rate? I want my ore to be in between coal and iron but I don't know the spawn values. Does anyone know?
  8. ahhhh thank you!
  9. Am I on the right lines with this json now? { "variants": { "normal": { "model": "parallelworlds:night_ore" } } "inventory": {"model": "parallelworlds:night_ore"} } I apparently have an error before the inventory section of the json file however when I hover over it there is no error code or anything displayed
  10. I have attached the images, as you can see the block placed is working and then as soon as it's broken it's not working. I'm assuming it's something to do with the json file that is registering the model but again I can't see the issue here. { "variants": { "normal": { "model": "parallelworlds:night_ore" } } }
  11. Also, I noticed that when the block is placed the texture works perfectly however when you break it or it's in your hand the texture is broken if that helps at all.
  12. Alright I'll give it a try, it might be something to do with spacing that we're over looking or something in the json but again im not sure myself haha
  13. Bump, still stuck with this,
  14. Bump
  15. yea, its exactly as it is on the message above
×
×
  • Create New...

Important Information

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