Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

noahc3

Forge Modder
  • Content Count

    26
  • Joined

  • Last visited

Community Reputation

0 Neutral

About noahc3

  • Rank
    Tree Puncher

Converted

  • Gender
    Male
  • Location
    MB, Canada

Recent Profile Visitors

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

  1. Thanks, that worked. I had to dig through the features recursively since they weren't always one level deep: @SubscribeEvent(priority = EventPriority.LOWEST) public static void BiomeLoadingIntercept(final BiomeLoadingEvent event) { BiomeGenerationSettingsBuilder gen = event.getGeneration(); for(Supplier<ConfiguredFeature<?, ?>> f : gen.getFeatures(GenerationStage.Decoration.UNDERGROUND_ORES)) { ConfiguredFeature<?, ?> resolved = resolve(f.get()); if (resolved.feature instanceof OreFeature) { OreFeatur
  2. The end goal is to disable certain aspects of vanilla ore/feature generation so I can replace them with my own features with custom values. To disable vanilla ore generation, I've created an event handler for BiomeLoadingEvent. This allows me to get the BiomeGenerationSettingsBuilder which allows me to get the list of ConfiguredFeature's for the biome associated with the event call: @SubscribeEvent(priority = EventPriority.LOWEST) public static void BiomeLoadingIntercept(final BiomeLoadingEvent event) { BiomeGenerationSettingsBuilder gen = event.getGeneration();
  3. I used to track the items life by using a tick counter, however I was forced to change this due to the fact that anytime NBT is updated, the item (if held) performs the re-equip animation, which looks very strange even with longer tick delays. In 1.8 this could be dealt with by enabling some flag that disables the re-equip animation, but this has a different effect in 1.10+ in which when you swap items, it actually doesn't change what item is rendered in hand (this might be a Forge bug). Ticks existed also won't work since the item can be toggled on and off, therefore it could real
  4. Hello! I have some items which have a timer that compares current system time and a stored system time while activated to determine when the item is "depleted" and should be removed from the players inventory. The problem is, if a player logs out with the item in an active state (determined by a NBT boolean value) and logs back in long enough after that the item would be considered old enough, the item depletes itself. To combat this, I figure I should detect if the player the item is held by is logging off, and when that happens, change necessary NBT values so that the item is in
  5. Minecraft does not like me using getItem on the itemstack returned from the slot check ( this.getStackInSlot(0).getItem() ), crashes and throws a NullPointerException, even though I'm making sure to check that it isn't null before executing any code using it. Crash report: http://paste.ee/p/CnMhU Tile Entity Class where the error is thrown: http://paste.ee/p/tyuNv (getItem checks around line 204) Help would be appreciated, and sorry for any hassle. EDIT: Whoops! Needed to make sure the ItemStack itself wasn't null before setting a variable to Itemstack.getItem()
  6. Simple (hopefully) question. How can I compare the itemstack in a slot with an itemstack that I am checking for. Eg. I am trying to check if slot index 0 has a diamond. I've tried just comparing the itemstack in the slot with new ItemStack(items.whatever) however that does not work presumably because certain data such as how long the item has existed for is different from a newly generated itemstack. Any help would be appreciated!
  7. Hey, I have an item which has 2 timers stored in NBT, a cooldown and a time remaining counter. For some reason, if the NBT is being modified, the item does some crazy jumping thing if you hold it in your hand (Like when you right click an item on the ground, except constant). I don't remember this being an issue in 1.7. Here is my code: http://pastebin.com/C9ZrfKVY Any help would be much appreciated!
  8. package noahc3.AbilityStones; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "abilstones", name = "Ability Stones", version = "1.0") public class AbilityStones
  9. en_US.lang: item.ItemRegenerationStone.name=Regeneration Stone itemGroup.tabAbilitystones=Ability Stones Again, when I put the item in my inventory, it correctly displays as Regeneration Stone.
  10. Hey, for some reason I have an item that while in the creative menu or in NEI, it's name is Unnamed. When I put it into my inventory it fixes itself. I suspect this may be due to me using NBT but I'm not sure. Here is my Item Class: package noahc3.AbilityStones; import java.util.List; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraf
  11. Hey, I'm currently having an issue where if you hold right click for longer than maybe half a second, the if statement I use to detect right clicks is constantly activating. Here is my if statement: public ItemStack onItemRightClick(ItemStack itemstack, World par2World, EntityPlayer par3EntityPlayer) { if(itemstack.stackTagCompound.getInteger("enabled") == 1) { itemstack.stackTagCompound.setInteger("enabled", 0); System.out.println("Was Enabled, now Disabled"); return itemstack; } else { itemstack.stackTagCompou
  12. @AwesomeSpider Thanks, switching it to return itemstack fixed it. Yea, it was a nullpointer exception. @coolAlias I have created the NBT tag further in the code with this: if(itemstack.stackTagCompound == null){ itemstack.stackTagCompound = new NBTTagCompound(); itemstack.stackTagCompound.setInteger("timer", 24000); itemstack.stackTagCompound.setInteger("enabled", 0); } Thanks for the help. That's inside onUpdate.
  13. Hey, I'm having some issues with detecting right clicks with an item. Here is the code I'm using: public ItemStack onItemRightClick(ItemStack itemstack, World par2World, EntityPlayer par3EntityPlayer) { if(itemstack.stackTagCompound.getInteger("enabled") == 1) { itemstack.stackTagCompound.setInteger("enabled", 0); System.out.println("Was Enabled, now Disabled"); return null; } else { itemstack.stackTagCompound.setInteger("enabled", 1); System.out.println("Was Disabled, now Enabled"); return null;
  14. I figured out how to do it, but yea, I decided to move the timer to NBT to stop the weird jumpy stuff it does when you hold it in your hand. Thanks anyways.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.