Jump to content

MuffinMonster

Forge Modder
  • Posts

    34
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Nearby
  • Personal Text
    Fresh Forge modder with a passion for muffins!

MuffinMonster's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Have you tried looking up source for the bat? It does fly around and "land" on blocks upside down, maybe you can find something useful there.
  2. Why don't you use a tileentity and use the metadata to change the appearance of the block? Also, a tileentity allows you to modify the block data in the onUpdate(or something similar) method which gets called regularly on the entity. If you need to fix the code you got you'd probably want a return statement where you turn the block into the "on state", the way you have it now it just turns into the block into the off state immediately after it has turned it into the On state.
  3. As I have seen the ItemRenderer only draws items in first-person mode. Isn't this the case?
  4. As noted in the last thread the positioning and rotation of a bow in hand (Note: Third-person view) there are only 2 places that handles the translation of the bow, ItemRenderer and RenderPlayer. There is the ItemRenderer class but as the comments note those methods render the item in First-person mode, and the misplaced bow is seen in third-person(Aka. The bow in First-person view is already rendered correctly). To be specific, this is the method I need to change: (It begins at line 345 in RenderPlayer) else if (itemstack1.getItem() == Items.bow) { f2 = 0.625F; GL11.glTranslatef(0.0F, 0.125F, 0.3125F); GL11.glRotatef(-20.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(f2, -f2, f2); GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); } This check, itemstack1.getItem() == Items.bow is not compatible with my custom bows, which means those translations and rotations never happen on my held bows. That's what need to be changed.
  5. Well, to start of with my knowledge of what RenderPlayer does is pretty much null(I think it's about rendering the third-person character) but I need to be able to change one method inside that class. Now I do know how to override and change the method but getting forge to actually call my changed method instead of the default one is where the problem is located. The method is renderEquippedItems() If you didn't know this is kind of a followup on my last thread on bows. Any help is appreciated.
  6. Ah, well, If you ask me I'd rather use the new Object[]{} instead of just adding everything as parameters just because of nicer formatting using the brackets. Anyways, good to know, thanks!
  7. What would you put in there? Just for the sake of learning
  8. We need more than that to go on. The only thing I can tell from that is that you're trying to add null to the registry, maybe you're doing "GameRegistry.registerItem(null,someStringName);" ?
  9. Do you have a @Mod tag in your main mod file? I have a similar working setup as following: @Mod(modid = Constants.MODID, name = Constants.NAME, version = Constants.VERSION) Also, is your mod in a different java project? Because I see that you got a Minecraft project AND a "LivelyAnimals" project that your files are located in. Try moving the java files into the Minecraft project under "src/main/java" and the mcmod.info to "src/main/resources" (As noted by Iarsgerrits)
  10. Thanks!, I'll have to look into how you'd do that then.
  11. I'd say that you could try to run "gradlew eclipse" again to see if that helps or even "gradlew setupDecompWorkspace" if the first doesn't work. These shouldn't modify your mod files.
  12. Afaik the way you register eventHandlers is by using MinecraftForge.EVENT_BUS.register(new EventHandlerClassHere() ); in the preInit or preLoad method. EDIT: Also you should be using @SideOnly(Side.CLIENT) When you're working on the clientside.
  13. If you didn't see the difference in the code SanAndreasP posted and yours it's here: spawner1.func_145881_a().new WeightedRandomChestMinecart(nbt, entityName) This creates a new WeightedRandomChestMinecart object with the specified parameters
  14. Well, yea. That's what I'd do, however I do not have even the slightest knowledge how the world generation works in Minecraft but that's how I'd do it. Another thing to note is that you might want to check the max-height there. Afaik the terrain in minecraft can sometimes reach about 240 blocks up (technically I think it may go all the way to 256 but it's not likely) but that means that if your tree is 11 blocks high and you create it at a height of 245 your tree will try to grow outside of the world. This is just a side-note and is doubtfully the cause of your crash but it's noteworthy. Also, just to clarify, does your minecraft run without the generation code? Caused by: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path This seems rather strange to me, though it could be a sideeffect of some other faulty code.
  15. Is it just me or would your code for the tree Y position have some nasty sideeffects? int randPosY=random.nextInt(250); //Max Y coordinate afaik, random.nextInt would give a random height from 0 to 250 in this case, and the tree should be on the ground level, not randomly flying or appearing underground which would be the case here.
×
×
  • Create New...

Important Information

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