Jump to content

DanielDawn

Forge Modder
  • Posts

    62
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

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

DanielDawn's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. I'm sorry if this has already been suggested. I wanted an event that happens at the end of EntityLiving#onInitialSpawn, so that I could add armor to the Entity. If the entity is spawned with the /summon command and the user specifies that they want certain settings for the Entity, I don't want to interfere in that scenario, and neither does Minecraft. This is why Minecraft checks if the argument length is greater than or equal to five to stop this from happening. I essentially want a nice way of adding to the pool of random Entity equipment some get when they spawn, without interfering with someone's wishes of an Entity being summoned with specific equipment. If not this, I'd like maybe some registry to add armor to the pool of randomly assigned equipment of an Entity, like how Fishing treasure, fish, and trash are added.
  2. I've resolved the issue. Instead I'm just individually setting Custom State Mappers right before each block is registered. Thanks for your help though.
  3. public static void registerCustomStateMaps() { ModelLoader.setCustomStateMapper(SeBlocks.glowstone_trail, new StateMap.Builder().ignore(new IProperty[] {BlockGlowstone_Trail.POWER}).build()); ModelLoader.setCustomStateMapper(SeBlocks.unbreakable_door, new StateMap.Builder().ignore(new IProperty[] {BlockUnbreakable_Door.POWERED}).build()); } If I create a new instance neither of them work. How can I get both of these blocks to have ignored properties?
  4. Below is what I've been doing in order to remove properties I don't use in my Blockstates file for a door I have. I'm trying to do this with a block I'm testing that's a direct imitation of redstone, as I'm trying to copy the way it connects to itself. Only problem I'm facing right now is that I'm not too keen on how the StateMaps work, and if I try to ignore any properties after the first thing I try to ignore they aren't ignored. For example, my door works fine if it's line is put first, but when I put my imitation redstone "glowstone_trail" first the door does not render correctly. public static void registerCustomStateMaps() { StateMap.Builder cSM = new StateMap.Builder(); ModelLoader.setCustomStateMapper(SeBlocks.glowstone_trail, (cSM).ignore(new IProperty[] {BlockGlowstone_Trail.POWER}).build()); ModelLoader.setCustomStateMapper(SeBlocks.unbreakable_door, (cSM).ignore(new IProperty[] {BlockUnbreakable_Door.POWERED}).build()); }
  5. Thank you, I registered my ItemMeshDefinition and my models were registered I just didn't show them. I also found out that the reason my item was using the inappropriate model was because I was not preventing the default model from loading, no wonder it kept using the default model. Anyway thank you so much for all your help, I'm recently updating from 1.7.10 to 1.8.9, and I hope to update to 1.9 as soon as I can finish this 1.8.9 version.
  6. So does Custom Mesh Definition use the modelresourcelocation specified? How can I be sure that the models it's using are registered? I keep getting a black and purple box, meaning that it couldn't find a json. My Platinum_Bow is using this method. It's currently just a placeholder for a different item. I'm testing to see if it even uses the se/models/item/platinum_bow_pulling_2.json and se/models/item/platinum_bow_pulling_0.json. @Override @SideOnly(Side.CLIENT) public ItemMeshDefinition getMeshDefinition() { return new ItemMeshDefinition() { public ModelResourceLocation getModelLocation(ItemStack stack) { if(stack.hasTagCompound()) { NBTTagCompound nbt = stack.getTagCompound(); if(nbt.getBoolean("platinum")) { return new ModelResourceLocation("se:" + SeItems.platinum_bow.getUnlocalizedName().substring(5) + "_pulling_2", "inventory"); } } return new ModelResourceLocation("se:" + SeItems.platinum_bow.getUnlocalizedName().substring(5) + "_pulling_0", "inventory"); } }; } I'm using my regular proxy to do what your easyregistry classes do. public static <T extends Item & IItemWithMeshDefinition> void registerItemWithCustomMeshDefinition(T item, String registryname) { SmallEnhancements.proxy._registerItemWithCustomMeshDefinition(item, registryname); } public <T extends Item & IItemWithMeshDefinition> void _registerItemWithCustomMeshDefinition(T item, String registryname) { GameRegistry.registerItem(item, registryname); } public static <T extends Item & IItemWithMeshDefinition> void registerSpecificItemVariantsWithBakery(T item, ItemStack variantStack) { SmallEnhancements.proxy._registerSpecificItemVariantsWithBakery(item, variantStack); } public <T extends IItemWithMeshDefinition> void _registerSpecificItemVariantsWithBakery(T item, ItemStack variantStack) { } I'm running those inside of my main class's fmlinitevent. proxy.registerRenders(); proxy._registerItemWithCustomMeshDefinition((Platinum_Bow)SeItems.platinum_bow, SeItems.platinum_bow.getUnlocalizedName().substring(5)); ItemStack variantStack = new ItemStack(SeItems.platinum_bow); variantStack.setTagCompound(new NBTTagCompound()); variantStack.getTagCompound().setBoolean("platinum", true); proxy.registerSpecificItemVariantsWithBakery((Platinum_Bow)SeItems.platinum_bow, variantStack); I'm clueless as to how to properly use the variant stack especially. I'm really lost. (Also I used 'history' to go to your commits where you barely started using custommeshdefinitions.)
  7. So I have a tool that is supposed to change colors based on nbt, and I have this working for the model in the hand. However, the model in the hotbar remains the same. In the past, I've used Item#getIcon Is it possible to change the inventory texture of an item based on it's nbt data? If so, I'd like to know how I would do so. I don't want to use durability because the item is a tool, and having a consumable item used to change its texture damaging it wouldn't make much sense and would mean that if the item were repaired its texture would be lost.
  8. Funny, I was testing out if I could do this on the Event Handler, but the player wearing my armor sees particle effects below their feet. Other players see the particle effects two blocks below. @SubscribeEvent public void playerTickEvent(PlayerTickEvent event) { if(event.player.getCurrentArmor(3) != null){ ItemStack helmet = event.player.getCurrentArmor(3); if(helmet.getItem() == SmallEnhancements.charm_mobility){ for (int count = 0; count < 2; count++){ double X = event.player.posX; double Y = event.player.posY; double Z = event.player.posZ; Random random = event.player.getEntityWorld().rand; for (int i = 0; i < 10; ++i) { int j1 = MathHelper.getRandomIntegerInRange(random, 0, 3); if(j1 == 0){ event.player.getEntityWorld().spawnParticle("reddust", (double)((float)X + random.nextFloat()), (double)Y - 1.5, (double)((float)Z + random.nextFloat()), 0, 0.74901960784, 0.89803921568); } if(j1 == 1){ event.player.getEntityWorld().spawnParticle("reddust", (double)((float)X - random.nextFloat()), (double)Y - 1.5, (double)((float)Z + random.nextFloat()), 0, 0.74901960784, 0.89803921568); } if(j1 == 2){ event.player.getEntityWorld().spawnParticle("reddust", (double)((float)X + random.nextFloat()), (double)Y - 1.5, (double)((float)Z - random.nextFloat()), 0, 0.74901960784, 0.89803921568); } if(j1 == 3){ event.player.getEntityWorld().spawnParticle("reddust", (double)((float)X - random.nextFloat()), (double)Y - 1.5, (double)((float)Z - random.nextFloat()), 0, 0.74901960784, 0.89803921568); } } } } } } Also I use 1.7.10
  9. Did not work, but can't believe I didn't notice the world parameter.
  10. I was currently using the OnArmorTick method to spawn particles to create a sort of particle trail. It only shows up for me, how can I make it visible to all players? @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { player.addPotionEffect(new PotionEffect(Potion.jump.getId(), 0, 1)); player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 0, 4)); for (int count = 0; count < 2; count++){ double X = player.posX; double Y = player.posY; double Z = player.posZ; Random random = player.worldObj.rand; for (int i = 0; i < 10; ++i) { int j1 = MathHelper.getRandomIntegerInRange(random, 0, 3); if(j1 == 0){ player.worldObj.spawnParticle("reddust", (double)((float)X + random.nextFloat()), (double)Y - 1.5, (double)((float)Z + random.nextFloat()), 0, 0, 0); } if(j1 == 1){ player.worldObj.spawnParticle("reddust", (double)((float)X - random.nextFloat()), (double)Y - 1.5, (double)((float)Z + random.nextFloat()), 0, 0, 0); } if(j1 == 2){ player.worldObj.spawnParticle("reddust", (double)((float)X + random.nextFloat()), (double)Y - 1.5, (double)((float)Z - random.nextFloat()), 0, 0, 0); } if(j1 == 3){ player.worldObj.spawnParticle("reddust", (double)((float)X - random.nextFloat()), (double)Y - 1.5, (double)((float)Z - random.nextFloat()), 0, 0, 0); } } } }
  11. Thank you both, that fixed my problem. Thank you for telling me about it spawning on the corner. I had a feeling it had some sort of motion.
  12. Okay, I'll try that, but about updating, I use some really outdated mods... Edit: Still getting flung, going to try a bigger number. I remember doing this with y + 2, still got flung.
  13. world.spawnEntityInWorld(new EntityItem (world, x, y+1, z, new ItemStack(modname.item, 1, 0))); ^That's what I've been doing. But, instead of spawning and staying there, the item sort of gets flung.
  14. Um what? I was hoping I could do this just like I removed the stepeffects and hiteffects. @SideOnly(Side.CLIENT) public boolean addHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) { return true; } @SideOnly(Side.CLIENT) public boolean addStepEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) { return true; }
×
×
  • Create New...

Important Information

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