
thedarkcolour
Members-
Posts
23 -
Joined
-
Last visited
Everything posted by thedarkcolour
-
Has anyone found a solution?
-
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
-
Custom Furnace GUI displays incorrect fuel left [1.12.2]
thedarkcolour replied to thedarkcolour's topic in Modder Support
I have figured it out, the original item's burntime value I use does not work properly ? -
Custom Furnace GUI displays incorrect fuel left [1.12.2]
thedarkcolour replied to thedarkcolour's topic in Modder Support
For some reason 0 / 1600 prints 78.125, rather than zero. It looks like there might be some weird math in my Gui method. -
Custom Furnace GUI displays incorrect fuel left [1.12.2]
thedarkcolour replied to thedarkcolour's topic in Modder Support
Added the Pastebin versions of the classes, in case you cannot access Hastebin. -
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
-
Can't you just check if it is morning/daytime when the event is fired, and do your stuff if it isn't daytime?
-
How do I return based on the NBT tag of an item?
thedarkcolour replied to thedarkcolour's topic in Modder Support
NEVERMIND: I got the stack.hasTagCompound to work, thanks -
How do I return based on the NBT tag of an item?
thedarkcolour replied to thedarkcolour's topic in Modder Support
Thanks! Adding break; fixed it -
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.
-
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"); } }