Skip to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. That forum actually made to help us, to fix our problems. You're giving strange hints instead of the whole material. We are newbs in java, thats why we ask a questions here. Have you ever feel like you talking to the wall!?
  2. I've also got an open source mod with a TileEntity and SpecialRenderer https://github.com/Draco18s/Artifacts (Look for the DisplayPedestal)
  3. @Override public String getItemDisplayName(ItemStack par1ItemStack) { //return whatever you want }
  4. That's a thought. Also avoids the pesky "but the stack is 64, can't make any more captain!" issue.
  5. Works for me. I tend to type BBCode tags anyway.
  6. You are correct sir. Somewhere along the way that fact slipped my mind. Only so many "textures not working" threads you can remember the exact answers to.
  7. Sadly, that requires knowing what you've done and the side effects thereof.
  8. It's stored in a private variable. You can't.
  9. To me, it looks right. But I haven't used Gradle yet, so there might be some subtle thing I'm not seeing.
  10. I only happened to run across it by accident. Glad to help out.
  11. What is Vanilla and how i can find it in Block class. Vanilla is moded minecraft, isnt it? http://www.urbandictionary.com/define.php?term=vanilla Preferring an activity or thing in its basic and unmodified state. It's the original of something, like the original Ice Cream flavour. In computergames the original game is called classic or vanilla While not technically wrong, that's not how it's done for blocks. Here's how Minecraft handles stone: public static final Block stone = (new BlockStone(1)).setHardness(1.5F).setResistance(10.0F).setStepSound(soundStoneFootstep).setUnlocalizedName("stone").setTextureName("stone"); Bonus hint: public void registerIcons(IconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon(this.getTextureName()); }
  12. Define "doesn't work." Without a description of what is (still) wrong and your current code, we cannot diagnose the cause.
  13. Its an out of memory error likely due to a memory leak, in which case Adding More Memory will not solve the problem.
  14. Oh, you're dealing with a horse. Welcome to Mojang Code. only the player equipment can be referenced that way. Almost every other entity uses its own inventory management system. Looking through EntityHorse, it does not appear to be possible to reference its equipment. private AnimalChest horseChest; //yes, Mojang actually didn't use EntityLivingBase.equipment
  15. Duh. If it equals null you can't then go accessing its child fields and methods. If "nothing happens" when you do it like I said, are you sure the slot is not empty?
  16. Was sorta messing around with some mods last night and needed a particular task to be supplied so that I didn't have to go into creative to get what I needed. Basically I found that Invasion Mod pretty much by itself sets Minecraft up to play like a Tower Defense game, though I added Utility Mobs and Special Mobs to make it more interesting. The "need" I had was supplying myself with swords, armor, and some building materials. I managed this quite effectively with one small downside: Items like swords will stack up, so I'd like to withdraw only 1 at a time, rather than the whole stack (and not interfere with items that can stack). Here's a screenshot of my block from some point during development: http://s28.postimg.org/glqve2j65/2014_01_05_19_06_10.png[/img] In creative mode the top slot can be modified (otherwise its locked). The block then counts down a timer, when it hits 0, adds the top stack to the bottom stack (so if the top stack was 2 iron bars, each time-unit the bottom stack would increase by 2; special rule: an input stack of 64 means the timer is instant). Bottom stack is output-only. Is there a way I can restrict how many are withdrawn at once when the user picks up the stack? I.e. with that stack of 2 swords if the user clicks it, they get 1 sword and the other remains in the slot. Footnote: As with a lot of problems I come across, the act of typing it out tends to reveal a solution. In this case, a hidden 3 slot that holds the sized stack, the output slot holding only the max possible, when empty it yoinks from the hidden slot as many as allowed. While certainly a solution, I'm going to leave this as is, amending: can it be done with only two slots?
  17. Usually this error occurs when the zip file isn't packaged properly. Check to see that the class file exists: [zip]/minecraftplaye/primevalforest/world/ChunkProviderPrimevalForest.class
  18. Yes, but slot is NOT empty. How can I check that slot is not or empty empty? I don't know And != null or ==null or !(.equal(null)) or .equal(null) not act at all You have to check for the thing that actually IS null, not the thing after it: if(par2EntityLivingBase.getCurrentItemOrArmor(1) != null) { par2EntityLivingBase.getCurrentItemOrArmor(1).getItem() <-- now you can do things. }
  19. Annotations are not class properties. You need to add a static modID field to your main mod class for that to work.
  20. Chunk.getBiomeArray() will return a reference to the per-block biome data.
  21. par2EntityLivingBase.getCurrentItemOrArmor(1) If that slot is empty, what will it return?
  22. It's not BECOMING null, it hasn't ever been SET YET. The variable DOES NOT EXIST for you to see if it is not-zero. Order of operations, dude. if(par1ItemStack.stackTagCompound.getInteger("myRandomNumber") /* != */ == 0) { THIS WILL FAIL BECAUSE stackTagCompound IS NULL RIGHT NOW.
  23. Given that almost no one makes mods using maps (I've seen one other, ever) I don't think you'd have "tons" (under the assumption that it is a real issue). Anyway, thanks for the link. Except I still don't know how to tell Java that it should be True, not False.
  24. Well...if you never right-click it (which checks the nbt tag for null and if it is, sets values) what did you EXPECT to happen?

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.