Jump to content

thedarkcolour

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by thedarkcolour

  1. I got it to work by not calling getWorld() and using IWorldGenerationReader#setBlockState, thanks!
  2. I just realized what I've done. I forgot to make the BeeNestGenerator method static. I'll check if that fixes it.
  3. I think I posted this topic in the wrong spot. Should I go post in Modder Support?
  4. It seems to be an issue with multi-threading. I'm not sure if I can patch somewhere else to avoid this, but it seems to be out of my control.
  5. I copy pasted it. Do you mean that the method name is cut off? It's also cut off in the log file.
  6. I'm using a coremod as part of my 1.14 mod. It inserts a static method call into TreeFeature#place. When I try to load into a world, an IncompatibleClassChangeError is thrown from a Server Worker thread, saying "expected static method thedarkcolour.futuremc.world.gen.BeeNestGenerator.generateBeeNestForSmallTrees..." The game freezes instead of crashing. How do I fix this? Log Coremod
  7. I have figured it out, the original item's burntime value I use does not work properly ?
  8. For some reason 0 / 1600 prints 78.125, rather than zero. It looks like there might be some weird math in my Gui method.
  9. Added the Pastebin versions of the classes, in case you cannot access Hastebin.
  10. I have a Custom Furnace block that works like the Smoker block from 1.14. I have gotten everything to work except the flame icon in between the two input slots. Instead of properly decreasing over time, it briefly disappears after a craft cycle and stays full the whole time. The white progress arrow works as intended. Here is an image of what the fire icon looks like while crafting. It stays like that until the coal runs out. Here are my classes: Tile Entity - https://hastebin.com/qocaxelofu.java Pastebin - https://pastebin.com/L4G2DMpb Container - https://hastebin.com/zodotevamu.java Pastebin - https://pastebin.com/MKGQSEdw GUI - https://hastebin.com/sanumopipo.java Pastebin - https://pastebin.com/TDum28ny
  11. Can't you just check if it is morning/daytime when the event is fired, and do your stuff if it isn't daytime?
  12. NEVERMIND: I got the stack.hasTagCompound to work, thanks
  13. Here is an example where a food item replaces itself with a bowl after it is consumed. public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving) { super.onItemUseFinish(stack, worldIn, entityLiving); return new ItemStack(Items.BOWL); } You should try to return a new Itemstack.
  14. I am trying to create an item that has a different effect based on its NBT tag. However, instead of picking a single effect, the item does every effect at once. Here is my return code: protected void onFoodEaten(ItemStack stack, World worldIn, EntityPlayer player) { //Only supposed to add one effect. if (!worldIn.isRemote) { String tag = (stack.getTagCompound().getString("effect")); switch(tag) { case "REGEN": player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 140, 1)); case "JUMP": player.addPotionEffect(new PotionEffect(MobEffects.JUMP_BOOST, 100, 1)); case "POISON": player.addPotionEffect(new PotionEffect(MobEffects.POISON, 220, 1)); case "WITHER": player.addPotionEffect(new PotionEffect(MobEffects.WITHER, 140, 1)); case "WEAKNESS":player.addPotionEffect(new PotionEffect(MobEffects.WEAKNESS, 160, 1)); case "BLINDNESS":player.addPotionEffect(new PotionEffect(MobEffects.BLINDNESS, 140, 1)); case "FIRE_RESISTANCE":player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 60, 1)); case "SATURATION":player.addPotionEffect(new PotionEffect(MobEffects.SATURATION, 100, 1)); case "SPEED":player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 100, 1)); } } } ...and here is the code for my tag. The tag works properly, so I doubt it is an error here: public void onUpdate(ItemStack stack, World world, Entity entity, int metadata, boolean bool) { NBTTagCompound nbt = stack.getTagCompound(); if(nbt == null) {stack.setTagCompound(new NBTTagCompound());} if(nbt.hasNoTags()) { nbt.setString("effect", "NULL"); } }
×
×
  • Create New...

Important Information

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