Everything posted by Draco18s
-
[1.5.2] TileEntityRenderer problems
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!?
-
[1.5.2] TileEntity Block missing texture
I've also got an open source mod with a TileEntity and SpecialRenderer https://github.com/Draco18s/Artifacts (Look for the DisplayPedestal)
-
[1.6.4] How to change a name of a item in code when right clicked.
@Override public String getItemDisplayName(ItemStack par1ItemStack) { //return whatever you want }
-
Pulling only Max Sized Stacks from an Inventory Slot
That's a thought. Also avoids the pesky "but the stack is 64, can't make any more captain!" issue.
-
[1.7.2]Calling Item causes crash
Works for me. I tend to type BBCode tags anyway.
-
[unsolved]Alternative to ModLoader.setInGameHook?
Real easy
-
[1.5.2] TileEntity Block missing texture
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.
-
OutOfMemoryError: Java heap space
Sadly, that requires knowing what you've done and the side effects thereof.
-
[1.7.2]Calling Item causes crash
It's stored in a private variable. You can't.
-
[1.7.2]textures don't work
To me, it looks right. But I haven't used Gradle yet, so there might be some subtle thing I'm not seeing.
-
[1.6.4]Changing a biome
I only happened to run across it by accident. Glad to help out.
-
[1.5.2] TileEntity Block missing texture
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()); }
-
[1.7.2]textures don't work
Define "doesn't work." Without a description of what is (still) wrong and your current code, we cannot diagnose the cause.
-
OutOfMemoryError: Java heap space
Its an out of memory error likely due to a memory leak, in which case Adding More Memory will not solve the problem.
-
[1.7.2]Calling Item causes crash
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
-
[1.7.2]Calling Item causes crash
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?
-
Pulling only Max Sized Stacks from an Inventory Slot
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?
-
[1.6.4] NoClassDefFoundError [SOLVED]
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
-
[1.7.2]Calling Item causes crash
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. }
-
[1.5.2] TileEntityRenderer problems
Annotations are not class properties. You need to add a static modID field to your main mod class for that to work.
-
[1.6.4]Changing a biome
Chunk.getBiomeArray() will return a reference to the per-block biome data.
-
[1.7.2]Calling Item causes crash
par2EntityLivingBase.getCurrentItemOrArmor(1) If that slot is empty, what will it return?
-
[1.6.4] Game crashing when using a NBT
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.
-
[1.6.2] NoSuchFieldError after Reobfuscation
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.
-
[1.6.4] Game crashing when using a NBT
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?
IPS spam blocked by CleanTalk.