Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Glistre

Members
  • Joined

  • Last visited

Everything posted by Glistre

  1. That means you aren't overriding a method (method signature doesn't match anything). You need to go look at the parent class to determine what the new signature is. I don't see that method #onEntityWalking in 1.8 Why is the #onEntityCollidedWithBlock is not working for me in 1.8? in 1.7.10 instead of the BlockPos parameter, it was x, y, z but I did not change anything else? Sry to bother you but I'm sure this is something pitifully simple I'm just f---ing missing it
  2. Edit: I was registering BlockFluidClassic and not my custom Block class so never called my overrided methods!!! Having a bit of trouble getting potion effects to work onEntityCollideWithBlock ...I have tried both (World worldIn, BlockPos pos, Entity entityIn) as parameters and (World worldIn, BlockPos pos, IBlockState state, Entity entityIn) @Override public void onEntityWalking(World worldIn, BlockPos pos, Entity entity){ super.onEntityWalking(worldIn, pos, entity); if ((!worldIn.isRemote && entity instanceof EntityPlayer )) ((EntityPlayer)entity).attackEntityFrom(DamageSource.wither, 100); } //tried using IBlockState needed for 1.8 since there are two possible overloads @Override public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, Entity entityIn) { if (entityIn instanceof EntityLiving ) { ((EntityLiving)entityIn).addPotionEffect(new PotionEffect(Potion.damageBoost.id, 200, 1, false, true)); //adds potion effect to mobs/ target --strength=damageboost } else if (entityIn instanceof EntityPlayer){ ((EntityPlayer)entityIn).addPotionEffect(new PotionEffect(Potion.confusion.id, 200, 0, false, true)); //adds potion effect to player/target--nausea=confusion System.out.print("Called"); } else if ((entityIn instanceof EntityBlackTobo || entityIn instanceof EntityTobieKing || entityIn instanceof EntityTobieQueen)){ ((EntityBlackTobo) entityIn).addPotionEffect(new PotionEffect(Potion.heal.id, 2000, 7, false, true)); ((EntityTobieKing) entityIn).addPotionEffect(new PotionEffect(Potion.heal.id, 2000, 7, false, true)); ((EntityTobieQueen) entityIn).addPotionEffect(new PotionEffect(Potion.heal.id, 2000, 7, false, true)); } } At any rate, not real sure what the four parameters of PotionEffect are, I think it is duration, level ..not sure on the two booleans. Also @Overriding onEntityWalking is redlined by eclipse . . .it does not seem to work at all in 1.8 ...has that method changed in 1.8 from 1.7.10? Edit: Looks like #onEntityWalking is now #onEntityCollidedWithBlock with only the three parameters --ie, no IBlockState, and the former #onEntityCollidedWithBlock now has four parameters. Mine is still not working though. Help appreciated
  3. I will do some new work and get back
  4. Not using anything yet. In 1.7.10 that's all I needed to add icespikes to my biome. I did try extending WorldGenerator , basically duplicating the WorldGenIceSpike class so that I could then change the ice spikes but that did not work. Should I implement IWorldGenerator instead for 1.8? package com.glistre.glistremod.worldgen; import java.util.Random; import com.glistre.glistremod.init.BiomeRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.feature.WorldGenerator; public class WorldGenFreonSpikes extends WorldGenerator { public boolean generate(World worldIn, Random random, BlockPos blockPos) { blockPos = new BlockPos(blockPos.getX(), blockPos.getY(), blockPos.getZ()); while (worldIn.isAirBlock(blockPos) && blockPos.getY() > 2) { blockPos = blockPos.down(); } if (worldIn.getBlockState(blockPos).getBlock() != Blocks.snow) { return false; } else { blockPos = blockPos.up(random.nextInt(4)); int l = random.nextInt(4) + 70; int i1 = l / 4 + random.nextInt(2); if (i1 > 1 && random.nextInt(60) == 0) { blockPos = blockPos.up(random.nextInt(70)); } int j1; int k1; int l1; for (j1 = 0; j1 < l; ++j1) { float f = (1.0F - (float)j1 / (float)l) * (float)i1; k1 = MathHelper.ceiling_float_int(f); for (l1 = -k1; l1 <= k1; ++l1) { float f1 = (float)MathHelper.abs_int(l1) - 0.25F; for (int i2 = -k1; i2 <= k1; ++i2) { float f2 = (float)MathHelper.abs_int(i2) - 0.25F; if ((l1 == 0 && i2 == 0 || f1 * f1 + f2 * f2 <= f * f) && (l1 != -k1 && l1 != k1 && i2 != -k1 && i2 != k1 || random.nextFloat() <= 0.75F)) { Block block1 = worldIn.getBlockState(blockPos.add(l1, j1, i2)).getBlock(); if (block1.getMaterial() == Material.air || block1 == Blocks.dirt || block1 == Blocks.snow || block1 == Blocks.ice) { this.func_175906_a(worldIn, blockPos.add(l1, j1, i2), Blocks.packed_ice); // worldIn.setBlockState(blockPos.add(l1, j1, i2), (IBlockState) Blocks.packed_ice); } if (j1 != 0 && k1 > 1) { block1 = worldIn.getBlockState(blockPos.add(l1, j1, i2)).getBlock(); if (block1.getMaterial() == Material.air || block1 == Blocks.dirt || block1 == Blocks.snow || block1 == Blocks.ice) { this.func_175906_a(worldIn, blockPos.add(l1, -j1, i2), Blocks.packed_ice); // worldIn.setBlock(xcoord + l1, ycoord - j1, zcoord + i2, Blocks.packed_ice); } } } } } } j1 = i1 - 1; if (j1 < 0) { j1 = 0; } else if (j1 > 1) { j1 = 1; } for (int j2 = -j1; j2 <= j1; ++j2) { k1 = -j1; while (k1 <= j1) { BlockPos blockPos1 = blockPos.add(k1, -1, l); // l1 = ycoord - 1; int k2 = 50; if (Math.abs(j2) == 1 && Math.abs(k1) == 1) { k2 = random.nextInt(5); } while (true) { if (blockPos1.getY() > 50) { Block block1 = worldIn.getBlockState(blockPos1).getBlock(); if (block1.getMaterial() == Material.air || block1 == Blocks.dirt || block1 == Blocks.snow || block1 == Blocks.ice || block1 == Blocks.packed_ice) { this.func_175906_a(worldIn, blockPos1, Blocks.packed_ice); // worldIn.setBlockState(pos0, (IBlockState)Blocks.packed_ice); // worldIn.setBlockState(xcoord + j2, l1, zcoord + k1, (IBlockState)Blocks.packed_ice); blockPos1 = blockPos1.down(); --k2; if (k2 <= 0) { blockPos1 = blockPos1.down(random.nextInt(5) + 1); // l1 -= random.nextInt(5) + 1; k2 = random.nextInt(5); } continue; } } ++k1; break; } } } return true; } } }
  5. All I needed in 1.7.10 to put ice spikes in my custom biome was the following in my biome class: this.theWorldGenerator = new WorldGenIceSpike(); That does not work for 1.8 . Does anyone have any suggestions?
  6. Dude, really we all know you're really smart no need to cuss
  7. Ohhh man, I am so dumb I was looking at the wrong line 94. Thanks (no need to curse though)!
  8. I get that but what the heck is wrong with that line?
  9. Crash report -- happens when two mobs attack each other ...everything was A-okay in 1.7.10
  10. I originally had a slight delay which made a cool effect when I placed the block ...a freezing effect... Thanks for the quick reply ...you are MLG boss works great now I set the tickRate to 30 and it works just the way I had planned ...
  11. I'm having trouble with my custom ice block that is supposed to change into 8 more blocks shortly after placed. I used #scheduleBlockUpdate in 1.7.10 and replaced it with #scheduleUpdate in 1.8 but I don't really get what's happening ...I think the third parameter is the tickRate which I set to 1, and I have tried setting setTickRandomly both true and false. What I want to happen works when #setTickRandomly is true but the blocks update truly randomly, not immediately. When I have #setTickRandomly set to false, nothing happens , ie, the custom block ice that I place does not change at all . . . Do I have the parameters wrong? Using wrong method? no idea what is the problem... this is my LiquidIce class, that is, my custom block ice: package com.glistre.glistremod.blocks; import java.util.Random; import com.glistre.glistremod.init.BiomeRegistry; import com.glistre.glistremod.init.BlockRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockIce; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; public class LiquidIceBlock extends BlockIce { public String blockName; public LiquidIceBlock() { super(); this.setUnlocalizedName(blockName); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, .99F, 1.0F); this.setTickRandomly(true); } /* @Override public int tickRate(){ return 30; }*/ public void onBlockAdded(World worldIn, BlockPos pos) { worldIn.scheduleUpdate(pos, this, 1); //was #scheduleBlockUpdate worldIn.setBlockState(pos, BlockRegistry.liquid_ice.getDefaultState()); } @Override public void updateTick( World worldIn, BlockPos pos, IBlockState state, Random rand) { super.updateTick(worldIn, pos, state, rand); Block blk = Blocks.snow_layer; Block blk1 = Blocks.snow; pos = new BlockPos(pos.getX(), pos.getY(), pos.getZ());//liquid ice BlockPos pos0 = new BlockPos(pos.getX(), (pos.getY()+1), pos.getZ());//ice BlockPos pos1 = new BlockPos((pos.getX()+1), pos.getY(), pos.getZ());//ice BlockPos pos2 = new BlockPos(pos.getX()-1, pos.getY(), pos.getZ());//ice BlockPos pos3 = new BlockPos(pos.getX(), pos.getY(), (pos.getZ()+1));//ice BlockPos pos4 = new BlockPos(pos.getX(), pos.getY(), (pos.getZ()-1));//ice BlockPos pos5 = new BlockPos(pos.getX(), pos.getY(), (pos.getZ()+2));//ice BlockPos pos6 = new BlockPos(pos.getX(), pos.getY(), (pos.getZ()-2));//ice BlockPos pos7 = new BlockPos((pos.getX()+2), pos.getY(), pos.getZ()); //snow_layer BlockPos pos8 = new BlockPos(pos.getX(), (pos.getY()+2), pos.getZ());//snow state=BlockRegistry.liquid_ice.getDefaultState(); IBlockState state0=blk.getDefaultState(); IBlockState state1= Blocks.ice.getDefaultState(); IBlockState state2=blk1.getDefaultState(); worldIn.setBlockState(pos, state); worldIn.setBlockState(pos0, state1); worldIn.setBlockState(pos1, state1); worldIn.setBlockState(pos2, state1); worldIn.setBlockState(pos3, state1); worldIn.setBlockState(pos4, state1); worldIn.setBlockState(pos5, state1); worldIn.setBlockState(pos6, state1); worldIn.setBlockState(pos7, state0); worldIn.setBlockState(pos8, state2); if (worldIn.getLightFor(EnumSkyBlock.BLOCK, pos) > 11 - this.getLightOpacity()) { if (worldIn.provider.doesWaterVaporize()) { worldIn.setBlockToAir(pos); } else { this.dropBlockAsItem(worldIn, pos, worldIn.getBlockState(pos), 0); worldIn.setBlockState(pos, Blocks.water.getDefaultState()); } } } @Override public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state) { return new AxisAlignedBB(0.0, 0.0, 0.0, 1.0, 0.99, 1.0); } // when right click placing Liquid Ice block draws in lightning @Override @SideOnly(Side.CLIENT) public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand){ BiomeGenBase b = BiomeRegistry.biomeFreon; if (b == BiomeRegistry.biomeFreon){ { worldIn.spawnEntityInWorld(new EntityLightningBolt(worldIn, (double)pos.getX() + 1.0D, (double)pos.getY() + 0.99D, (double)pos.getZ() + 1.0D)); } } } //not even sure what this does @Override public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) { super.setBlockBoundsBasedOnState(worldIn, pos); }
  12. Okay fixed that , thank you very, very much #getEntityBoundingBox
  13. AxisAlignedBB axisalignedbb = this.getBoundingBox().expand(4.0D, 4.0D, 4.0D);
  14. Is the problem I am having because of missing texture or the onImpact method? NPE... [11:49:12] [Client thread/WARN]: Failed to load texture: glistremod:textures/items.poison_protection_1.png java.io.FileNotFoundException: glistremod:textures/items.poison_protection_1.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:70) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:34) ~[simpleTexture.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:70) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:44) [TextureManager.class:?] at com.glistre.glistremod.effects.potions.splash.RenderSplashPotion.bindTexture(RenderSplashPotion.java:122) [RenderSplashPotion.class:?] at com.glistre.glistremod.effects.potions.splash.RenderSplashPotion.bindEntityTexture(RenderSplashPotion.java:115) [RenderSplashPotion.class:?] at com.glistre.glistremod.effects.potions.splash.RenderSplashPotion.doRender(RenderSplashPotion.java:62) [RenderSplashPotion.class:?] at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:381) [RenderManager.class:?] at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:338) [RenderManager.class:?] at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:305) [RenderManager.class:?] at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:657) [RenderGlobal.class:?] at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1353) [EntityRenderer.class:?] at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1266) [EntityRenderer.class:?] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091) [EntityRenderer.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1114) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:376) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] [11:49:12] [server thread/ERROR]: Encountered an unexpected exception net.minecraft.util.ReportedException: Ticking entity at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:781) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) ~[MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) ~[integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_60] Caused by: java.lang.NullPointerException at com.glistre.glistremod.effects.potions.splash.EntitySplashProjectile.onImpact(EntitySplashProjectile.java:122) ~[EntitySplashProjectile.class:?] at com.glistre.glistremod.effects.potions.splash.EntitySplashThrowable.onUpdate(EntitySplashThrowable.java:234) ~[EntitySplashThrowable.class:?] at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2031) ~[World.class:?] at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:758) ~[WorldServer.class:?] at net.minecraft.world.World.updateEntity(World.java:1997) ~[World.class:?] at net.minecraft.world.World.updateEntities(World.java:1823) ~[World.class:?] at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:587) ~[WorldServer.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:775) ~[MinecraftServer.class:?] ... 4 more package com.glistre.glistremod.effects.potions.splash; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import java.util.Iterator; import java.util.List; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import com.glistre.glistremod.GlistreMod; import com.glistre.glistremod.init.GlistreEntityRegistry; import com.glistre.glistremod.init.ItemRegistry; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemPotion; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; public class EntitySplashProjectile extends EntitySplashThrowable { /** The damage value of the thrown potion that this EntityPotion represents. */ private ItemStack potionDamage; private static final String __OBFID = "CL_00001727"; public EntitySplashProjectile(World world) { super(world); } public EntitySplashProjectile(World world, EntityLivingBase entity, int p_i1789_3_) { this(world, entity, new ItemStack(GlistreEntityRegistry.splash_poison_protection, 1, p_i1789_3_)); } public EntitySplashProjectile(World world, EntityLivingBase entity, ItemStack itemStack) { super(world, entity); this.potionDamage = itemStack; } @SideOnly(Side.CLIENT) public EntitySplashProjectile(World world, double x, double y, double z, int p_i1791_8_) { this(world, x, y, z, new ItemStack(GlistreEntityRegistry.splash_poison_protection, 1, p_i1791_8_)); } public EntitySplashProjectile(World world, double x, double y, double z, ItemStack itemStack) { super(world, x, y, z); this.potionDamage = itemStack; } /** * Gets the amount of gravity to apply to the thrown entity with each tick. */ protected float getGravityVelocity() { return 0.05F; } protected float func_70182_d() { return 0.5F; } protected float func_70183_g() { return -20.0F; } public void setPotionDamage(int potionId) { if (this.potionDamage == null) { this.potionDamage = new ItemStack(GlistreEntityRegistry.splash_poison_protection, 1, 0); } this.potionDamage.setItemDamage(potionId); } /** * Returns the damage value of the thrown potion that this EntityPotion represents. */ public int getPotionDamage() { if (this.potionDamage == null) { this.potionDamage = new ItemStack(GlistreEntityRegistry.splash_poison_protection, 1, 0); } return this.potionDamage.getItemDamage(); } /** * Called when this EntityThrowable hits a block or entity. */ /* @Override protected void onImpact(MovingObjectPosition m) { if(m.typeOfHit == EnumMovingObjectType.ENTITY) m.entityHit.addPotionEffect(entity.addPotionEffect(new PotionEffect(ItemRegistry.poison_protect_potion.id, 3000, 0, false, false)); ); if (!this.worldObj.isRemote) { this.setDead(); } }*/ @Override protected void onImpact(MovingObjectPosition mop) { AxisAlignedBB axisalignedbb = this.getBoundingBox().expand(4.0D, 4.0D, 4.0D); List<EntityLivingBase> entities = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); if(mop.entityHit != null ) { if (entities != null && !entities.isEmpty()) { Iterator iterator = entities.iterator(); while (iterator.hasNext()) { EntityLivingBase hitEntity = (EntityLivingBase)iterator.next(); double distanceToHit = this.getDistanceSqToEntity(hitEntity); if (distanceToHit < 16.0D) { double durationMultiplier = 1.0D - Math.sqrt(distanceToHit) / 4.0D; if (hitEntity == mop.entityHit) { durationMultiplier = 1.0D; } for (EntityLivingBase entity : entities) { entity.addPotionEffect(new PotionEffect(ItemRegistry.poison_protect_potion.id, 3000, 0, false, false)); } if (!this.worldObj.isRemote) { //2002 blue water potion circles, 2003 purple expanding effect, 2004 fire , 2005 green sparkles //changed last parameter this.getPotionDamage() to 4 makes green swirls; 888888 makes particles splashing charcoal, 555555 makes orange swirls, purple/pink 777777, 333333 reddust //6 grey swirls 444444 darkredblood reddust, 2 light blue grey swirls 229911 darkblue swirls //1.8 update added BlockPos next line BlockPos pos = new BlockPos((int)Math.round(this.posX), (int)Math.round(this.posY), (int)Math.round(this.posZ)); this.worldObj.playAuxSFX(2002, pos, 4); this.setDead(); } } } } } } /** * (abstract) Protected helper method to read subclass entity data from NBT. */ public void readEntityFromNBT(NBTTagCompound tagCompound) { super.readEntityFromNBT(tagCompound); if (tagCompound.hasKey("Potion", 10)) { this.potionDamage = ItemStack.loadItemStackFromNBT(tagCompound.getCompoundTag("Potion")); } else { this.setPotionDamage(tagCompound.getInteger("potionValue")); } if (this.potionDamage == null) { this.setDead(); } } /** * (abstract) Protected helper method to write subclass entity data to NBT. */ public void writeEntityToNBT(NBTTagCompound p_70014_1_) { super.writeEntityToNBT(p_70014_1_); if (this.potionDamage != null) { p_70014_1_.setTag("Potion", this.potionDamage.writeToNBT(new NBTTagCompound())); } } }
  15. Seems the problem was with blaster_bolt_1 in the Custom Tab Registry not registered first had nothing to do with tobie_worst_sword_1 But thanks you pointed me in the right direction!
  16. I will hunt for it seems like the item is getting called then before it's registered == NPE EDIT: the problem is related to the TabRegistry because when I take out the custom tabs completely the item shows up without the crash
  17. I rearranged the main class (sorry left out where I initialize GlistreEntityRegistry)I still get the same crash although I put the TabRegistry after everything else: public static void init(FMLInitializationEvent event ) { BlockRegistry.init(); BlockRegistry.register(); ItemRegistry.init(); ItemRegistry.register(); FMLCommonHandler.instance().bus().register(instance); Recipes.initShapedRecipes(); Recipes.initShapelessRecipes(); Recipes.initSmeltingRecipes(); WorldGen.initWorldGen(); BiomeRegistry.GlistreMod(); DimensionRegistry.GlistreMod(); GlistreEntityRegistry.initializeEntity(); GlistreEntityRegistry.registerEntity(); proxy.Init(); proxy.registerRenders();//can be done in any init phase but must be done AFTER items are registered TabRegistry.initializeTab(); TabRegistry.registerTab(); TabRegistry package com.glistre.glistremod.tabs; import java.util.List; import com.glistre.glistremod.GlistreMod; import com.glistre.glistremod.entities.placers.GlistreEntityMonsterPlacer; import com.glistre.glistremod.init.BlockRegistry; import com.glistre.glistremod.init.GlistreEntityRegistry; import com.glistre.glistremod.init.ItemRegistry; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraft.enchantment.Enchantment; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class TabRegistry { public static void GlistreMod(){ initializeTab(); registerTab(); } // the ray or blast bolt like an arrow public static Item blasterbolt_1; public int blasterbolt_1ID; public static Item enderbolt_1; public int enderbolt_1ID; public static Item sceptrebolt_1; public int sceptrebolt_1ID; //DECLARE CREATIVE TABS public static GlistreTabs glistre_tab_1; public static GlistreTabs tab_custom; public static GlistreTabs tab_builder; public static GlistreTabs tab_food; public static GlistreTabs tab_potion; public static void initializeTab(){ //LOAD THE CREATIVE TABS glistre_tab_1 = new GlistreTabs("glistre_tab_1"){ public Item getTabIconItem(){ return (ItemRegistry.glistre_sword); } //puts in tab and displays in the order that you'd like public void displayAllReleventItems(List list) { list.add(new ItemStack(ItemRegistry.silver_sword_1)); ItemStack enchant01 = new ItemStack(ItemRegistry.silver_sword_1); enchant01.addEnchantment(Enchantment.baneOfArthropods, ; list.add(enchant01); list.add(new ItemStack(ItemRegistry.glistre_sword)); ItemStack enchant = new ItemStack(ItemRegistry.glistre_sword); enchant.addEnchantment(Enchantment.sharpness, 5); list.add(enchant); list.add(new ItemStack(ItemRegistry.mighty_sword)); list.add(new ItemStack(ItemRegistry.mighty_ice_sword)); list.add(new ItemStack(ItemRegistry.custom_bow_1)); ItemStack enchant04 = new ItemStack(ItemRegistry.custom_bow_1); enchant04.addEnchantment(Enchantment.infinity, 10); enchant04.addEnchantment(Enchantment.power, 7); list.add(enchant04); list.add(new ItemStack(ItemRegistry.blaster_gun_1)); list.add(new ItemStack(ItemRegistry.ender_gun)); list.add(new ItemStack(ItemRegistry.silver_helmet_1)); list.add(new ItemStack(ItemRegistry.silver_chestplate_1)); list.add(new ItemStack(ItemRegistry.silver_leggings_1)); list.add(new ItemStack(ItemRegistry.silver_boots_1)); ItemStack enchant0 = new ItemStack(ItemRegistry.silver_helmet_1); ItemStack enchant1 = new ItemStack(ItemRegistry.silver_chestplate_1); ItemStack enchant2 = new ItemStack(ItemRegistry.silver_leggings_1); ItemStack enchant3 = new ItemStack(ItemRegistry.silver_boots_1); enchant0.addEnchantment(Enchantment.protection, 4); enchant1.addEnchantment(Enchantment.blastProtection, 4); enchant2.addEnchantment(Enchantment.protection, 4); enchant3.addEnchantment(Enchantment.protection, 4); enchant3.addEnchantment(Enchantment.featherFalling, 4); list.add(enchant0); list.add(enchant1); list.add(enchant2); list.add(enchant3); list.add(new ItemStack(ItemRegistry.glistre_helmet_1)); list.add(new ItemStack(ItemRegistry.glistre_chestplate_1)); list.add(new ItemStack(ItemRegistry.glistre_leggings_1)); list.add(new ItemStack(ItemRegistry.glistre_boots_1)); ItemStack enchant4 = new ItemStack(ItemRegistry.glistre_helmet_1); ItemStack enchant5 = new ItemStack(ItemRegistry.glistre_chestplate_1); ItemStack enchant6 = new ItemStack(ItemRegistry.glistre_leggings_1); ItemStack enchant7 = new ItemStack(ItemRegistry.glistre_boots_1); enchant4.addEnchantment(Enchantment.fireProtection, 4); enchant5.addEnchantment(Enchantment.fireProtection, 4); enchant6.addEnchantment(Enchantment.fireProtection, 4); enchant7.addEnchantment(Enchantment.fireProtection, 4); list.add(enchant4); list.add(enchant5); list.add(enchant6); list.add(enchant7); list.add(new ItemStack(ItemRegistry.chain_helmet_1)); list.add(new ItemStack(ItemRegistry.chain_chestplate_1)); list.add(new ItemStack(ItemRegistry.chain_leggings_1)); list.add(new ItemStack(ItemRegistry.chain_boots_1)); ItemStack enchant8 = new ItemStack(ItemRegistry.chain_helmet_1); ItemStack enchant9 = new ItemStack(ItemRegistry.chain_chestplate_1); ItemStack enchant10 = new ItemStack(ItemRegistry.chain_leggings_1); ItemStack enchant11 = new ItemStack(ItemRegistry.chain_boots_1); enchant8 = new ItemStack(ItemRegistry.chain_helmet_1); enchant9 = new ItemStack(ItemRegistry.chain_chestplate_1); enchant10 = new ItemStack(ItemRegistry.chain_leggings_1); enchant11 = new ItemStack(ItemRegistry.chain_boots_1); enchant8.addEnchantment(Enchantment.projectileProtection, 5); enchant9.addEnchantment(Enchantment.projectileProtection, 5); enchant10.addEnchantment(Enchantment.projectileProtection, 5); enchant11.addEnchantment(Enchantment.projectileProtection, 5); list.add(enchant8); list.add(enchant9); list.add(enchant10); list.add(enchant11); } }; tab_custom = new GlistreTabs("tab_custom") { public Item getTabIconItem() { return (ItemRegistry.silver_pickaxe_1); } public void displayAllReleventItems(List list) { list.add(new ItemStack(ItemRegistry.silver_pickaxe_1)); ItemStack enchant02 = new ItemStack(ItemRegistry.silver_pickaxe_1); enchant02.addEnchantment(Enchantment.fortune, 4); list.add(enchant02); list.add(new ItemStack(ItemRegistry.glistre_pickaxe)); ItemStack enchant03 = new ItemStack(ItemRegistry.glistre_pickaxe); enchant03.addEnchantment(Enchantment.efficiency, 3); enchant03.addEnchantment(Enchantment.unbreaking, 3); list.add(enchant03); list.add(new ItemStack(ItemRegistry.glistre_pickaxe_2)); ItemStack enchant04 = new ItemStack(ItemRegistry.glistre_pickaxe_2); enchant04.addEnchantment(Enchantment.efficiency, 4); list.add(enchant04); list.add(new ItemStack(ItemRegistry.glistre_burner)); list.add(new ItemStack(ItemRegistry.toby_king_burner)); list.add(new ItemStack(ItemRegistry.wolf_howl)); list.add(new ItemStack(ItemRegistry.wolves_howling)); list.add(new ItemStack(ItemRegistry.sasquatch)); list.add(new ItemStack(ItemRegistry.silver_ingot_1)); list.add(new ItemStack(ItemRegistry.glistre_ingot)); list.add(new ItemStack(ItemRegistry.glistre_dust)); list.add(new ItemStack(ItemRegistry.item_spawn_egg)); list.add(new ItemStack(ItemRegistry.item_spawn_egg_1)); list.add(new ItemStack(ItemRegistry.item_spawn_egg_3)); } }; tab_food = new GlistreTabs("tab_food") { public Item getTabIconItem() { return (ItemRegistry.glistre_food_1); } public void displayAllReleventItems(List list) { list.add(new ItemStack(ItemRegistry.glistre_food_1)); list.add(new ItemStack(ItemRegistry.glistre_food_2)); list.add(new ItemStack(ItemRegistry.nori)); list.add(new ItemStack(ItemRegistry.sushi)); } }; tab_builder = new GlistreTabs("tab_builder") { public Item getTabIconItem() { return new ItemStack(BlockRegistry.silver_ore_1).getItem(); } public void displayAllReleventItems(List list) { list.add(new ItemStack(BlockRegistry.silver_ore_1)); list.add(new ItemStack(BlockRegistry.silver_ore_2)); list.add(new ItemStack(BlockRegistry.silver_ore_3)); list.add(new ItemStack(BlockRegistry.silver_ore_4)); list.add(new ItemStack(BlockRegistry.silver_block_1)); list.add(new ItemStack(BlockRegistry.silver_block_2)); list.add(new ItemStack(BlockRegistry.silver_block_3)); list.add(new ItemStack(BlockRegistry.silver_block_4)); list.add(new ItemStack(BlockRegistry.glistre_block_1)); list.add(new ItemStack(BlockRegistry.enchanted_block_1)); list.add(new ItemStack(BlockRegistry.light_fire)); list.add(new ItemStack(BlockRegistry.light_portal)); list.add(new ItemStack(BlockRegistry.light_toby_king_fire)); list.add(new ItemStack(BlockRegistry.light_toby_king_portal)); list.add(new ItemStack(BlockRegistry.liquid_ice)); list.add(new ItemStack(BlockRegistry.block_seaweed)); } }; tab_potion = new GlistreTabs("tab_potion"){ public Item getTabIconItem() { return (ItemRegistry.poison_protection); } //puts in tab and displays in the order that you'd like public void displayAllReleventItems(List list) { list.add(new ItemStack(ItemRegistry.poison_protection)); list.add(new ItemStack(GlistreEntityRegistry.splash_poison_protection)); list.add(new ItemStack(ItemRegistry.nausea_protection)); list.add(new ItemStack(ItemRegistry.vomitus)); list.add(new ItemStack(GlistreEntityRegistry.tobie_worst_projectile_1)); list.add(new ItemStack(ItemRegistry.sceptre_1)); list.add(new ItemStack(ItemRegistry.sceptre_egg)); list.add(new ItemStack(ItemRegistry.tobie_queen_egg)); list.add(new ItemStack(ItemRegistry.tobie_king_egg)); list.add(new ItemStack(TabRegistry.blasterbolt_1)); list.add(new ItemStack(TabRegistry.enderbolt_1)); list.add(new ItemStack(TabRegistry.sceptrebolt_1)); } }; } public static void registerTab(){ } public static void registerRenders(){ } }
  18. I worked on this a bit. ..but I cannot seem to figure out how the item would be null. I have the following where I register the entity: Entity Registry public class GlistreEntityRegistry { public static void GlistreMod(){ initializeEntity(); registerEntity(); } public static Item tobie_worst_projectile_1; public static int modEntityID = 0; public static void initializeEntity(){ tobie_worst_projectile_1 = new TobyEntitySword(Item.ToolMaterial.IRON).setUnlocalizedName("tobie_worst_projectile_1"); } public static void registerEntity() { // TOBIE'S WORST ENEMY GameRegistry.registerItem(tobie_worst_projectile_1, "tobie_worst_projectile_1"); EntityRegistry.registerModEntity(TobyEntityProjectile.class, "tobie_worst_projectile_1", ++modEntityID, GlistreMod.instance, 80, 3, true); } public static void registerRenders(){ registerRender(tobie_worst_projectile_1); } public static void registerRender(Item item){ RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); renderItem.getItemModelMesher().register(tobie_worst_projectile_1, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } Client Proxy: [code] package com.glistre.glistremod.proxies; import java.awt.Color; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFX; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.fml.client.registry.RenderingRegistry; import com.glistre.glistremod.GlistreMod; import com.glistre.glistremod.init.BlockRegistry; import com.glistre.glistremod.init.GlistreEntityRegistry; import com.glistre.glistremod.init.ItemRegistry; import com.glistre.glistremod.init.Recipes; import com.glistre.glistremod.projectiles.tobyworstsword.TobyEntityProjectile; import com.glistre.glistremod.projectiles.tobyworstsword.TobyRenderProjectile; import com.glistre.glistremod.tabs.TabRegistry; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.registry.EntityRegistry; public class ClientProxy extends CommonProxy { @Override public void Init(){ this.registerRenders(); ItemRegistry.registerRenders(); BlockRegistry.registerRenders(); GlistreEntityRegistry.registerRenders(); TabRegistry.registerRenders(); } @Override public void registerRenders(){ RenderingRegistry.registerEntityRenderingHandler(TobyEntityProjectile.class, new TobyRenderProjectile(Minecraft.getMinecraft().getRenderManager(), GlistreEntityRegistry.tobie_worst_projectile_1, Minecraft.getMinecraft().getRenderItem())); } } Main class: package com.glistre.glistremod; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.VERSION, guiFactory = Reference.GUI_FACTORY, canBeDeactivated = true) @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) public static CommonProxy proxy; @Mod.Instance(Reference.MOD_ID) public static GlistreMod instance; @EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.preInit(); @EventHandler public static void init(FMLInitializationEvent event ) { BlockRegistry.init(); BlockRegistry.register(); // ItemRegistry.GlistreMod(); ItemRegistry.init(); //Are these not needed since I have public void Init in the client proxy? ItemRegistry.register(); // TabRegistry.GlistreMod(); TabRegistry.initializeTab(); TabRegistry.registerTab(); FMLCommonHandler.instance().bus().register(instance); Recipes.initShapedRecipes(); Recipes.initShapelessRecipes(); Recipes.initSmeltingRecipes(); GlistreEntityRegistry.GlistreMod(); WorldGen.initWorldGen(); BiomeRegistry.GlistreMod(); DimensionRegistry.GlistreMod(); proxy.Init(); proxy.registerRenders();//can be done in any init phase but must be done AFTER items are registered @EventHandler public static void postInit( FMLPostInitializationEvent event ) { proxy.postInit(); } } At my wit's end and tried so many things just getting confused. help needed
  19. java.lang.IllegalArgumentException: Duplicate id value for 18! at net.minecraft.entity.DataWatcher.func_75682_a(SourceFile:64) I get this crash when Minecraft tries to spawn my entities in the world package com.glistre.glistremod.init; import com.glistre.glistremod.GlistreMod; import com.glistre.glistremod.effects.potions.splash.EntitySplashProjectile; import com.glistre.glistremod.effects.potions.splash.ItemSplashPotion; import com.glistre.glistremod.entities.blacktobie.EntityBlackTobo; import com.glistre.glistremod.entities.guardian.EntityTobieSkel; import com.glistre.glistremod.entities.king.EntityTobieKing; import com.glistre.glistremod.entities.queen.EntityTobieQueen; //import com.glistre.glistremod.entities.unused.EntityTobie; import com.glistre.glistremod.entities.wolf.EntityBlackWolf; import com.glistre.glistremod.entities.wolf.EntityGlistreWolf; import com.glistre.glistremod.projectiles.blaster.EntityBlasterBolt; import com.glistre.glistremod.projectiles.blaster.EntityEnderBoltFireball; import com.glistre.glistremod.projectiles.tobyworstsword.TobyEntityProjectile; import com.glistre.glistremod.projectiles.tobyworstsword.TobyProjectile; import com.glistre.glistremod.projectiles.tobyworstsword.TobyRenderProjectile; import com.glistre.glistremod.tabs.TabRegistry; import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.common.registry.EntityRegistry; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraft.entity.EntityList; import net.minecraft.item.Item; import net.minecraft.potion.PotionEffect; public class GlistreEntityRegistry { public static void GlistreMod(){ initializeEntity(); registerEntity(); } public static Item splash_poison_protection; // Tobie's Worst Enemy Sword public static Item tobie_worst_projectile_1; public static int modEntityID = 0; public static void initializeEntity(){ splash_poison_protection = new ItemSplashPotion(17, "splash_poison_protection", new PotionEffect[]{new PotionEffect(31, 1200)}, 888888).setUnlocalizedName("potion.splash_poison_protection").setCreativeTab(TabRegistry.tab_potion); //TOBIE'S WORST ENEMY Sword/Item tobie_worst_projectile_1 = new TobyProjectile(tobie_worst_projectile_1, "tobie_worst_projectile_1").setUnlocalizedName("tobie_worst_projectile_1").setCreativeTab(TabRegistry.tab_potion); } public static void registerEntity() { // 1.8 removed crash GameRegistry.registerItem(splash_poison_protection, splash_poison_protection.getUnlocalizedName()); //SPLASH POTION EntityRegistry.registerModEntity(EntitySplashProjectile.class, "splash_poison_protection", ++modEntityID, GlistreMod.instance, 80, 3, true); //1.8 removed crash // TOBIE'S WORST ENEMY GameRegistry.registerItem(tobie_worst_projectile_1, tobie_worst_projectile_1.getUnlocalizedName()); EntityRegistry.registerModEntity(TobyEntityProjectile.class, "tobie_worst_projectile_1", ++modEntityID, GlistreMod.instance, 80, 3, true); // BLASTERS EntityRegistry.registerModEntity(EntityBlasterBolt.class, "blaster_bolt_1" , ++modEntityID, GlistreMod.instance, 128, 10, true); EntityRegistry.registerModEntity(EntityEnderBoltFireball.class, "ender_bolt_1", ++modEntityID, GlistreMod.instance, 80, 3, true); // MOBS EntityRegistry.registerModEntity(EntityGlistreWolf.class, "glistre_wolf", ++modEntityID, GlistreMod.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityBlackWolf.class, "black_wolf", ++modEntityID, GlistreMod.instance, 80, 3, false); // EntityRegistry.registerEgg (EntityBlackWolf.class, 0xFFD700, 0xc5b358); // EntityList.classToStringMapping.put(ItemRegistry.item_spawn_egg_2, "black_wolf"); EntityRegistry.registerModEntity(EntityBlackTobo.class, "corrupted_tobie", ++modEntityID, GlistreMod.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityTobieSkel.class, "tobie_skelly_guardian", ++modEntityID, GlistreMod.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityTobieKing.class, "tobie_king", ++modEntityID, GlistreMod.instance, 80, 3, false); EntityRegistry.registerModEntity(EntityTobieQueen.class, "tobie_queen_elizabeth", ++modEntityID, GlistreMod.instance, 80, 3, false); } } Client proxy package com.glistre.glistremod.proxies; import java.awt.Color; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFX; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityList; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.fml.client.registry.RenderingRegistry; import com.glistre.glistremod.GlistreMod; import com.glistre.glistremod.effects.EntityPortalFreonFX; import com.glistre.glistremod.effects.potions.splash.EntitySplashProjectile; import com.glistre.glistremod.effects.potions.splash.RenderSplashPotion; import com.glistre.glistremod.entities.*; import com.glistre.glistremod.entities.blacktobie.BlackModelTobo; import com.glistre.glistremod.entities.blacktobie.BlackRenderTobo; import com.glistre.glistremod.entities.blacktobie.EntityBlackTobo; import com.glistre.glistremod.entities.guardian.EntityTobieSkel; import com.glistre.glistremod.entities.guardian.TobieSkelRender; import com.glistre.glistremod.entities.king.EntityTobieKing; import com.glistre.glistremod.entities.king.TobieKingRender; import com.glistre.glistremod.entities.king.TobieModelKing; import com.glistre.glistremod.entities.queen.EntityTobieQueen; import com.glistre.glistremod.entities.queen.TobieModelQueen; import com.glistre.glistremod.entities.queen.TobieQueenRender; import com.glistre.glistremod.entities.wolf.BlackModelWolf; import com.glistre.glistremod.entities.wolf.BlackRenderWolf; import com.glistre.glistremod.entities.wolf.EntityBlackWolf; import com.glistre.glistremod.entities.wolf.EntityGlistreWolf; import com.glistre.glistremod.entities.wolf.GlistreModelWolf; import com.glistre.glistremod.entities.wolf.GlistreRenderWolf; import com.glistre.glistremod.init.BlockRegistry; import com.glistre.glistremod.init.GlistreEntityRegistry; import com.glistre.glistremod.init.ItemRegistry; import com.glistre.glistremod.init.Recipes; //import com.glistre.glistremod.items.bow.BusterBowRenderer; import com.glistre.glistremod.projectiles.blaster.EntityBlasterBolt; import com.glistre.glistremod.projectiles.blaster.EntityEnderBoltFireball; import com.glistre.glistremod.projectiles.blaster.EntitySceptreBolt; import com.glistre.glistremod.projectiles.blaster.RendreBlast; import com.glistre.glistremod.projectiles.blaster.RendreBlast2; import com.glistre.glistremod.projectiles.blaster.RendreBlast3; import com.glistre.glistremod.projectiles.tobyworstsword.TobyEntityProjectile; import com.glistre.glistremod.projectiles.tobyworstsword.TobyRenderProjectile; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.registry.EntityRegistry; public class ClientProxy extends CommonProxy { @Override public void Init(){ this.registerRenders(); ItemRegistry.registerRenders(); BlockRegistry.registerRenders(); } @Override public void registerRenders(){ //removed from 1.8 MinecraftForgeClient.registerItemRenderer(ItemRegistry.custom_bow_1, new BusterBowRenderer()); // GlistreEntityRegistry.registerEntity(); // RenderingRegistry.registerEntityRenderingHandler(EntityGlistreWolf.class, new GlistreRenderWolf(Minecraft.getMinecraft().getRenderManager(), new ModelMyMob(), 0.2F)); RenderingRegistry.registerEntityRenderingHandler(EntityGlistreWolf.class, new GlistreRenderWolf(Minecraft.getMinecraft().getRenderManager(), new GlistreModelWolf(), 0.3F)); RenderingRegistry.registerEntityRenderingHandler(EntityBlackWolf.class, new BlackRenderWolf(Minecraft.getMinecraft().getRenderManager(), new BlackModelWolf(), 0.3F)); RenderingRegistry.registerEntityRenderingHandler(EntityBlackTobo.class, new BlackRenderTobo(Minecraft.getMinecraft().getRenderManager(), new BlackModelTobo(), 0.7F)); RenderingRegistry.registerEntityRenderingHandler(EntityTobieSkel.class, new TobieSkelRender(Minecraft.getMinecraft().getRenderManager(), new BlackModelTobo(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityTobieQueen.class, new TobieQueenRender(Minecraft.getMinecraft().getRenderManager(), new TobieModelQueen(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityTobieKing.class, new TobieKingRender(Minecraft.getMinecraft().getRenderManager(), new TobieModelKing(), 0.5F)); RenderingRegistry.registerEntityRenderingHandler(EntityBlasterBolt.class, new RendreBlast(Minecraft.getMinecraft().getRenderManager())); RenderingRegistry.registerEntityRenderingHandler(EntityEnderBoltFireball.class, new RendreBlast2(Minecraft.getMinecraft().getRenderManager())); RenderingRegistry.registerEntityRenderingHandler(EntitySceptreBolt.class, new RendreBlast3(Minecraft.getMinecraft().getRenderManager())); RenderingRegistry.registerEntityRenderingHandler(TobyEntityProjectile.class, new TobyRenderProjectile(Minecraft.getMinecraft().getRenderManager())); RenderingRegistry.registerEntityRenderingHandler(EntitySplashProjectile.class, new RenderSplashPotion(Minecraft.getMinecraft().getRenderManager())); // RenderingRegistry.registerEntityRenderingHandler(EntitySplashProjectile.class, new RenderSplashPotion(GlistreEntityRegistry.splash_poison_protection)); } @Override public void addParticleEffect(EntityFX particle) { double motionX = particle.worldObj.rand.nextGaussian() * 0.02D; double motionY = particle.worldObj.rand.nextGaussian() * 0.02D; double motionZ = particle.worldObj.rand.nextGaussian() * 0.02D; EntityFX particleMysterious = new EntityPortalFreonFX( particle.worldObj, particle.posX + particle.worldObj.rand.nextFloat() * particle.width * 2.0F - particle.width, particle.posY + 0.5D + particle.worldObj.rand.nextFloat() * particle.height, particle.posZ + particle.worldObj.rand.nextFloat() * particle.width * 2.0F - particle.width, motionX, motionY, motionZ); Minecraft.getMinecraft().effectRenderer.addEffect(particle); } }
  20. I am sure this is totally wrong. Could use some instruction on how to render entities and projectiles. . .does anyone know any good tutorials for 1.8 on rendering projectiles? the #doRender from 1.7.10 no longer works at all, I thought if I removed that and added RenderManager in the constructor it would work, obviously not. Should I start over and revisit EntityArrow class? ---- Minecraft Crash Report ---- // Everything's going to plan. No, really, that was supposed to happen. Time: 7/29/16 8:22 AM Description: Rendering item java.lang.NullPointerException: Rendering item at net.minecraft.item.ItemStack.getMetadata(ItemStack.java:280) at net.minecraft.client.renderer.ItemModelMesher.getMetadata(ItemModelMesher.java:70) at net.minecraft.client.renderer.ItemModelMesher.getItemModel(ItemModelMesher.java:43) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:360) at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:411) at net.minecraft.client.gui.inventory.GuiContainer.drawSlot(GuiContainer.java:293) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:116) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:53) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:659) at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:470) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1114) at net.minecraft.client.Minecraft.run(Minecraft.java:376) at net.minecraft.client.main.Main.main(Main.java:117) 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(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.item.ItemStack.getMetadata(ItemStack.java:280) at net.minecraft.client.renderer.ItemModelMesher.getMetadata(ItemModelMesher.java:70) at net.minecraft.client.renderer.ItemModelMesher.getItemModel(ItemModelMesher.java:43) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:360) -- Item being rendered -- Details: Item Type: null Item Aux: ~~ERROR~~ NullPointerException: null Item NBT: null Item Foil: ~~ERROR~~ NullPointerException: null Stacktrace: at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:411) at net.minecraft.client.gui.inventory.GuiContainer.drawSlot(GuiContainer.java:293) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:116) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:53) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:659) at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:470) -- Screen render details -- Details: Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative Mouse location: Scaled: (243, 32). Absolute: (486, 414) Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Player897'/131, l='MpServer', x=276.93, y=102.01, z=422.72]] Chunk stats: MultiplayerChunkCache: 577, 577 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: -162.00,64.00,478.00 - World: (-162,64,478), Chunk: (at 14,4,14 in -11,29; contains blocks -176,0,464 to -161,255,479), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 7091 game time, 7091 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 54 total; [EntityBat['Bat'/5888, l='MpServer', x=237.50, y=22.45, z=423.45], EntityBat['Bat'/5889, l='MpServer', x=228.23, y=22.22, z=421.34], EntityBat['Bat'/5890, l='MpServer', x=237.24, y=25.09, z=424.66], EntityBat['Bat'/6148, l='MpServer', x=206.27, y=22.38, z=473.29], EntityBat['Bat'/6149, l='MpServer', x=208.50, y=19.75, z=476.67], EntityWitch['Witch'/6153, l='MpServer', x=215.50, y=19.00, z=456.50], EntityWitch['Witch'/6154, l='MpServer', x=213.50, y=19.00, z=454.50], EntityWitch['Witch'/6155, l='MpServer', x=212.50, y=19.00, z=457.50], EntitySpider['Spider'/6165, l='MpServer', x=216.50, y=20.02, z=494.50], EntityCreeper['Creeper'/6170, l='MpServer', x=212.50, y=25.02, z=381.50], EntitySkeleton['Skeleton'/6174, l='MpServer', x=238.19, y=25.00, z=434.66], EntitySkeleton['Skeleton'/6175, l='MpServer', x=234.50, y=25.02, z=436.50], EntityZombie['Zombie'/6179, l='MpServer', x=230.50, y=21.02, z=432.50], EntityBat['Bat'/5926, l='MpServer', x=237.29, y=25.39, z=422.84], EntityBat['Bat'/5928, l='MpServer', x=234.50, y=23.19, z=424.56], EntitySkeleton['Skeleton'/6184, l='MpServer', x=201.50, y=23.02, z=472.50], EntityZombie['Zombie'/5932, l='MpServer', x=356.50, y=17.00, z=371.50], EntityZombie['Zombie'/5933, l='MpServer', x=355.50, y=17.00, z=371.50], EntityEnderman['Enderman'/6194, l='MpServer', x=212.50, y=20.02, z=456.50], EntityZombie['Zombie'/6195, l='MpServer', x=209.50, y=20.02, z=458.50], EntityZombie['Zombie'/6196, l='MpServer', x=207.50, y=20.02, z=460.50], EntitySkeleton['Skeleton'/6200, l='MpServer', x=222.50, y=22.02, z=502.50], EntitySkeleton['Skeleton'/6201, l='MpServer', x=220.50, y=22.02, z=500.50], EntitySkeleton['Skeleton'/6202, l='MpServer', x=225.50, y=22.02, z=501.50], EntityZombie['Zombie'/6206, l='MpServer', x=201.50, y=23.02, z=475.50], EntityZombie['Zombie'/6207, l='MpServer', x=199.50, y=23.02, z=471.50], EntityCreeper['Creeper'/5952, l='MpServer', x=238.29, y=25.00, z=418.47], EntityBat['Bat'/5964, l='MpServer', x=247.25, y=20.13, z=413.19], EntityCreeper['Creeper'/5967, l='MpServer', x=220.84, y=29.00, z=426.47], EntityPlayerSP['Player897'/131, l='MpServer', x=276.93, y=102.01, z=422.72], EntityZombie['Zombie'/5743, l='MpServer', x=241.50, y=26.00, z=404.50], EntityBat['Bat'/6000, l='MpServer', x=224.73, y=28.85, z=424.44], EntityWitch['Witch'/6019, l='MpServer', x=247.50, y=19.00, z=405.50], EntityBat['Bat'/6040, l='MpServer', x=239.51, y=21.22, z=421.96], EntityZombie['Zombie'/6043, l='MpServer', x=241.50, y=25.00, z=433.50], EntityBat['Bat'/6047, l='MpServer', x=224.91, y=29.08, z=344.70], EntitySkeleton['Skeleton'/6059, l='MpServer', x=239.06, y=32.00, z=407.56], EntitySkeleton['Skeleton'/6060, l='MpServer', x=234.50, y=31.00, z=410.50], EntityCreeper['Creeper'/6061, l='MpServer', x=234.50, y=31.00, z=408.50], EntitySkeleton['Skeleton'/6072, l='MpServer', x=240.24, y=28.00, z=425.25], EntitySkeleton['Skeleton'/6073, l='MpServer', x=233.60, y=27.55, z=428.54], EntityBat['Bat'/6076, l='MpServer', x=233.02, y=23.79, z=423.18], EntityBat['Bat'/6077, l='MpServer', x=227.44, y=29.93, z=425.45], EntityCreeper['Creeper'/6085, l='MpServer', x=233.11, y=27.00, z=426.09], EntityCreeper['Creeper'/6086, l='MpServer', x=229.50, y=27.00, z=427.50], EntityCreeper['Creeper'/6092, l='MpServer', x=197.50, y=19.00, z=464.50], EntitySkeleton['Skeleton'/6093, l='MpServer', x=208.58, y=20.00, z=460.94], EntitySkeleton['Skeleton'/6094, l='MpServer', x=205.50, y=20.00, z=470.50], EntityBat['Bat'/6099, l='MpServer', x=248.94, y=20.56, z=410.56], EntityCreeper['Creeper'/5858, l='MpServer', x=217.50, y=27.00, z=360.50], EntityCreeper['Creeper'/5859, l='MpServer', x=218.50, y=27.00, z=359.50], EntityBat['Bat'/5872, l='MpServer', x=216.56, y=33.10, z=409.41], EntitySpider['Spider'/6129, l='MpServer', x=207.50, y=19.00, z=478.50], EntityBat['Bat'/5887, l='MpServer', x=231.69, y=24.63, z=423.99]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:392) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2614) at net.minecraft.client.Minecraft.run(Minecraft.java:398) at net.minecraft.client.main.Main.main(Main.java:117) 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(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_60, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 7218370616 bytes (6883 MB) / 8355053568 bytes (7968 MB) up to 8355053568 bytes (7968 MB) JVM Flags: 4 total; -Xmx8192M -Xms8192M -Xmx8192M -Xms8192M IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.4.1577 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8-11.14.4.1577.jar) UCHIJAAAA Forge{11.14.4.1577} [Minecraft Forge] (forgeSrc-1.8-11.14.4.1577.jar) UCHIJAAAA glistremod{2.0} [Glistre Mod] (bin) Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 353.54' Renderer: 'GeForce GTX 980M/PCIe/SSE2' Launched Version: 1.8 LWJGL: 2.9.1 OpenGL: GeForce GTX 980M/PCIe/SSE2 GL version 4.5.0 NVIDIA 353.54, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: No Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) package com.glistre.glistremod.projectiles.tobyworstsword; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.Entity; import net.minecraft.entity.projectile.EntityPotion; import net.minecraft.item.Item; import net.minecraft.item.ItemPotion; import net.minecraft.potion.PotionHelper; //import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; @SideOnly(Side.CLIENT) public class TobyRenderProjectile extends Render { private Item field_94151_a; private int field_94150_f; private static final ResourceLocation tobyWorstTextures = new ResourceLocation("glistremod:textures/toby_worst_projectile_1.png"); public TobyRenderProjectile(RenderManager renderManager) { super(renderManager); } public TobyRenderProjectile(RenderManager renderManager, Item item, int par2) { super (renderManager); this.field_94151_a = item; this.field_94150_f = par2; } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ /* public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { IIcon icon = this.field_94151_a.getIconFromDamage(this.field_94150_f); if (icon != null) { GL11.glPushMatrix(); GL11.glTranslatef((float)par2, (float)par4, (float)par6); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glScalef(0.5F, 0.5F, 0.5F); this.bindEntityTexture(par1Entity); Tessellator tessellator = Tessellator.instance; if (icon == ItemPotion.func_94589_d("bottle_splash")) { int i = PotionHelper.func_77915_a(((EntityPotion)par1Entity).getPotionDamage(), false); float f2 = (float)(i >> 16 & 255) / 255.0F; float f3 = (float)(i >> 8 & 255) / 255.0F; float f4 = (float)(i & 255) / 255.0F; GL11.glColor3f(f2, f3, f4); GL11.glPushMatrix(); this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay")); GL11.glPopMatrix(); GL11.glColor3f(1.0F, 1.0F, 1.0F); } this.func_77026_a(tessellator, icon); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); } }*/ protected boolean bindEntityTexture(Entity entity) { ResourceLocation resourcelocation = this.getEntityTexture(entity); if (resourcelocation == null) { return false; } else { this.bindTexture(resourcelocation); return true; } } public void bindTexture(ResourceLocation location) { this.renderManager.renderEngine.bindTexture(location); } @Override protected ResourceLocation getEntityTexture(Entity entity) { // return TextureMap.locationItemsTexture; return this.tobyWorstTextures; } } /*rotate projectile -default for GL11 ....playerViewY =1.0F, 1.0F, 1.0F */ /* private void func_77026_a(Tessellator par1Tessellator, IIcon par2Icon) { float f = par2Icon.getMinU(); float f1 = par2Icon.getMaxU(); float f2 = par2Icon.getMinV(); float f3 = par2Icon.getMaxV(); float f4 = 1.0F; float f5 = 0.5F; float f6 = 0.25F; GL11.glRotatef(180.0F - this.renderManager.playerViewY, 1.5F, 1.0F, 1.5F); GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); par1Tessellator.startDrawingQuads(); par1Tessellator.setNormal(0.0F, 1.0F, 0.0F); par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3); par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3); par1Tessellator.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2); par1Tessellator.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2); par1Tessellator.draw(); } // GL11.glRotatef(par1EntityArrow.prevRotationYaw + (par1EntityArrow.rotationYaw - par1EntityArrow.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F); }*/
  21. I believe that has solved it, and removed #getRenderType 1 public static final PropertyInteger LEVEL = PropertyInteger.create("level", 0, 15); Not sure why I am using 16 of these ... is that required? Well, I can fix that later lol
  22. Works fine now . . I used BlockHelper #forBlock since it's still on 1.8 Thanks!
  23. java.lang.IllegalArgumentException: Cannot get property PropertyInteger{name=level, clazz=class java.lang.Integer, values=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]} as it does not exist in BlockState{block=glistremod:block_seaweed, properties=[age]} at net.minecraft.block.state.BlockState$StateImplementation.getValue(BlockState.java:174) ~[blockState$StateImplementation.class:?] at net.minecraft.block.Block.canSustainPlant(Block.java:1935) ~[block.class:?] at net.minecraft.block.BlockBush.canPlaceBlockAt(BlockBush.java:35) ~[blockBush.class:?] at net.minecraft.world.gen.feature.WorldGenWaterlily.generate(WorldGenWaterlily.java:20) ~[WorldGenWaterlily.class:?] package com.glistre.glistremod.biome; import java.util.Random; import com.glistre.glistremod.entities.blacktobie.EntityBlackTobo; import com.glistre.glistremod.entities.guardian.EntityTobieSkel; import com.glistre.glistremod.entities.wolf.EntityGlistreWolf; import com.glistre.glistremod.init.BlockRegistry; import com.google.common.base.Predicate; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraft.block.Block; import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockFlower.EnumFlowerType; import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.pattern.BlockHelper; //import net.minecraft.block.material.Material; import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.entity.passive.EntityHorse; import net.minecraft.entity.passive.EntityOcelot; import net.minecraft.entity.passive.EntityPig; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.BiomeGenForest; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenBigTree; import net.minecraft.world.gen.feature.WorldGenClay; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenTaiga2; import net.minecraft.world.gen.feature.WorldGenTallGrass; import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraftforge.event.world.BlockEvent; public class GlistreBiome extends BiomeGenBase { BiomeDecoratorGlistre customBiomeDecorator; private WorldGenerator theWorldGenerator; public GlistreBiome(int id) { super(id); this.theWorldGenerator = new WorldGenMinable((IBlockState) BlockRegistry.silver_ore_1.getDefaultState(), 20); this.theWorldGenerator = new WorldGenMinable((IBlockState) BlockRegistry.silver_block_1.getDefaultState(), ; this.setBiomeName("Glistering Biome"); //this is the top layer, so the first thing you see will be this block //next are the 3-5 layers bellow your top layer this.topBlock = (IBlockState) Blocks.grass.getDefaultState(); this.fillerBlock = (IBlockState) Blocks.dirt.getDefaultState(); this.theBiomeDecorator = new BiomeDecoratorGlistre(); customBiomeDecorator = new BiomeDecoratorGlistre(); customBiomeDecorator =(BiomeDecoratorGlistre)theBiomeDecorator; this.theBiomeDecorator = this.createBiomeDecorator(); this.customBiomeDecorator.seaweedPerChunk = 200; this.customBiomeDecorator.seaweedGen = new WorldGenSeaweed(3); this.theBiomeDecorator.clayPerChunk = 2; this.theBiomeDecorator.treesPerChunk = 2; [b] this.theBiomeDecorator.waterlilyPerChunk = 150; // what's wrong now? [/b] this.theBiomeDecorator.bigMushroomsPerChunk = 1; this.theBiomeDecorator.flowersPerChunk = 100; this.theBiomeDecorator.reedsPerChunk = 10; this.theBiomeDecorator.grassPerChunk = 10; this.spawnableWaterCreatureList.clear(); this.spawnableMonsterList.clear(); this.spawnableCreatureList.add(new SpawnListEntry(EntityOcelot.class, 10, 1, 1)); this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 20, 5, 7)); this.spawnableCreatureList.add(new SpawnListEntry(EntityPig.class, 1, 2, 7)); this.spawnableMonsterList.add(new SpawnListEntry(EntitySkeleton.class, 1, 1, 1)); this.spawnableMonsterList.add(new SpawnListEntry(EntityZombie.class, 1, 1, 1)); this.spawnableCreatureList.add(new SpawnListEntry(EntityGlistreWolf.class, 20, 3, 5)); this.spawnableCreatureList.add(new SpawnListEntry(EntityTobieSkel.class, 30, 3, 7)); this.spawnableCreatureList.add(new SpawnListEntry(EntityBlackTobo.class, 10, 1, 2)); this.addFlower(Blocks.yellow_flower.getDefaultState().withProperty(Blocks.yellow_flower.getTypeProperty(), BlockFlower.EnumFlowerType.DANDELION), 30); this.addFlower(Blocks.red_flower.getDefaultState().withProperty(Blocks.red_flower.getTypeProperty(), BlockFlower.EnumFlowerType.POPPY), 30); // this.addFlower(Blocks.pumpkin, 7, 20); // 1.8 pumpkins?? this.addFlower(Blocks.pumpkin.getDefaultState().withProperty(((BlockFlower) Blocks.pumpkin).getTypeProperty(), BlockFlower.EnumFlowerType.DANDELION), 30); // this.setColor(0x7F007F); // this.setColor(0x443333); this.canSpawnLightningBolt(); this.setColor(0x003000); this.setEnableSnow(); this.enableSnow = true; this.enableRain = true; this.isHighHumidity(); this.setMinMaxHeight(0.75F, 1.1F); //first parameter is temp .2F and rain looks like snow, second parameter is rainfall 0F none .5F is normal this.setTemperatureRainfall(0.75F, 1.0F); } @Override public void addFlower(IBlockState state, int weight) { this.flowers.add(new FlowerEntry(state, weight)); } public boolean darkenSkyDuringRain() { return true; } public boolean canSpawnLightningBolt() { return this.enableSnow ? true : this.enableRain; } private void setMinMaxHeight(float f, float g) { } public int getSkyColorByTemp(float par1) { // return 0x443333; //grey sky //gold/grey sky return 0xA0A016; } /** * Gets a WorldGen appropriate for this biome. */ public WorldGenerator getRandomWorldGenForGrass(Random random){ return random.nextInt(2) == 0 ? new WorldGenSeaweed(3) : new WorldGenSeaweed(10); } public WorldGenerator getRandomWorldGenForTrees(Random par1Random){ return(WorldGenerator)(par1Random.nextInt(1) == 0 ? this.worldGeneratorBigTree : (par1Random.nextInt(6) == 0 ? this.worldGeneratorSwamp : par1Random.nextInt(20) == 0 ? this.worldGeneratorTrees : this.worldGeneratorTrees)); } //replaces the block with SilverBlock copied from BlockEmeraldClass public void decorate(World worldIn, Random random, BlockPos blockPos) { super.decorate(worldIn, random, blockPos); //next two bizarre lines of code is update to 1.8 for (int chunkX = 0; chunkX < 4; ++chunkX) { for (int chunkZ = 0; chunkZ < 4; ++chunkZ) { int k = 3 + random.nextInt(6); int l; int i1; int j1; for (l = 0; l < k; ++l) { i1 = chunkX + random.nextInt(16); j1 = random.nextInt(28) + 4; int k1 = chunkZ + random.nextInt(16); if (worldIn.getBlockState(blockPos).getBlock().isReplaceableOreGen(worldIn, blockPos, (BlockHelper.forBlock(BlockRegistry.silver_ore_1)))) { worldIn.setBlockState(blockPos, (IBlockState) BlockRegistry.silver_block_1.getDefaultState(), 2); } } for (k = 0; k < 7; ++k) { l = chunkX + random.nextInt(16); i1 = random.nextInt(64); j1 = chunkZ + random.nextInt(16); this.theWorldGenerator.generate(worldIn, random, blockPos); } } } } } Seems to be crashing because of WorldGenWaterLily
  24. what diesen said, there is no registry name ...you say <name> and then .getUnlocalizedName ...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.