larsgerrits
Members-
Posts
3462 -
Joined
-
Last visited
-
Days Won
17
Everything posted by larsgerrits
-
[1.8] Tutorial advise request for multiblocks and GUI
larsgerrits replied to KriszDev's topic in Modder Support
The tutorial is made for Minecraft 1.7.10. The logic is the same, and you should be able to adapt the code to 1.8. -
I tried to use some special characters like those a while ago, and I figured it is because it is because of the unicode font Minecraft uses is smaller than the 'normal' font for Minecraft. I couldn't figure out a solution, so I just gave up on using them.
-
You are using Blocks.air as your stone block. Edit: I did not realise something went wrong with posting.
-
What? 1.4.7? That version is more than 3 years old! We don't provide help for any version besides the latest version [nobbc](1.[/nobbc] and the version before that (1.7). If users are complaining about it, tell them they should move on to later versions. There's absolutely no reason the stay behing this far.
-
If you only need to display the energy value in a GUI, and you have a Container associated with your GUI, use the Container to syncronize the energy value to the client. This will only make it syncronize if the GUI is open. Look at the ContainerFurnace class, specifically the addCraftingToCrafters , detectAndSendChanges and updateProgressBar methods.
-
[1.8] Entity dies instantly when spawning (SOLVED)
larsgerrits replied to YoungErtu's topic in Modder Support
First, make sure you are not in peaceful mode. Second: if(props.getCurrentMana() >= manacost){ props.consumeMana(manacost); tick = 0; } if(props.getCurrentMana() < manacost){ player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.RED + "You have not enough Mana, your Celestial Spirit was desummoned.")); this.worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, this.posX, this.posY, this.posZ, 0, 0, 0, 0); this.setDead(); } Let's follow that logic. I don't know your current mana at that point, but let's say you have 6 mana. You have manacost = 5. - if(props.getCurrentMana() >= manacost) Your current mana is 6, and manacost is 5, so that condition is true. --- props.consumeMana(manacost) I suspect consumeMana is reducing your current mana with the manacost, leaving you with only 1 mana left. - if(props.getCurrentMana() < manacost) Your current mana is 1 at this point, and manacost is 5, so that is indeed less and that condition is true. --- Kill the entity Have you figured it out yet? If you don't have atleast 2*manacost when you start, the entity instantly dies because the second if-statement is true because you already removed the mana from the player. You have to add else to the second if-statement. -
[1.8.9] getStackInSlotOnClosing no longer exists for ItemStack
larsgerrits replied to swordkorn's topic in Modder Support
For what I can tell, the name is the only thing that has changed, so yes, you can leave the 'returns and everything' the same. -
[1.8.9] getStackInSlotOnClosing no longer exists for ItemStack
larsgerrits replied to swordkorn's topic in Modder Support
That method is now called removeStackFromSlot . -
You created an ItemStack with a null item.
-
How do you know '1000 becomes some random negative value'? Show us how you debugged that, it may help us. Also, instanceof already does null checks, so you can remove those getTileEntity() != null calls.
-
No, they were always in the same order (x,y,z), he just named them wrong...
-
[1.8] check if full Armor is worn (SOLVED)
larsgerrits replied to YoungErtu's topic in Modder Support
So you have a method available that runs every tick, but you subscribe to a TickEvent and do it in there... Seems a bit illogical to me, or not? You only want your mana to run down when you have three pieces of armor equipped. So in the onArmorTick method, check if the player has each of those three armor pieces equipped. You already have that. Now your issue is that the method is called 3 times? Maybe that's because you have 3 armor pieces equipped... So a simple if-statement to check if ItemStack#getItem() == Mod.YourItem should suffice. Why so complicated with tick events? -
You might be able to push a new matrix and rotate the model in RenderPlayerEvent.Pre and then pop the matrix in RenderPLayerEvent.Post . I haven't used the RenderPlayerEvent , so I don't know if this works at all.
-
PixelAcceleration error when debugging?
larsgerrits replied to skruffysdeveloper's topic in Modder Support
From searching for about 5-10 minutes, I found the three most common causes for this issue: - Your graphics drivers are outdated - Invalid memory allocation, if you set any Java arguments in your Profile Settings, please remove them. - On first- and second- generation Intel HD graphics chipsets, a Java version below 8u60 is needed on Windows 10. The fixes for thise problems are pretty self-explanatory. (Note, all this info comes from here, and I do not know if any of these fixes help, as I've never had this issue before) -
1.7.10--determining if a block is solid
larsgerrits replied to Elrol_Arrowsend's topic in Modder Support
Your right, that method is client-side-only. Didn't even check for that one. You can always go with Block#isNormalCube(IBlockAccess,x,y,z) or one of the suggestions above. -
1.7.10--determining if a block is solid
larsgerrits replied to Elrol_Arrowsend's topic in Modder Support
Why not use Block#isBlockNormalCube() ? It checks Material#blocksMovement() and if the block is rendered like a normal block. -
Please, another one of these tutorials? You don't have to make a 'Forge' project for only and a mod project on top of that. This is what you have to do for a working (!!) workspace: - Download mdk files. - Extract them to a folder. - Run gradlew setupDecompWorkspace eclipse . - Open Eclipse in any location you want. - Go to File -> Import , select your mod folder. That's it. This should make a project with the example mod. 1 project per mod, no more, no less. y Also, from the comments of that tutorial, I see more people having problems with that setup.
-
Look at what you think the methods would do. Inside the 1st if-statement you set an integer to NBT, and do something when you are NOT in creative mode. You are working on a gun Item , and you have a variable called magazine . Now I guess that you check if you got a magazine in your inventory, set an integer to NBT and consume the Item when you are NOT in creative mode. Now looking at the InventoryPlayer class, it has the methods hasItem and consumeInventoryItem . So func_146028_bis hasItem and func_146026_a is consumeInventoryItem . So you see, with a little logic it's very easy to figure out the proper names (writing this took me longer than getting the proper names without an IDE).
-
Wow, I totally forgot about the grass block... Also, right now there is this in the log: [17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#metal=nickel not found [17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#metal=lead not found [17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#metal=tin not found [17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#metal=copper not found [17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#inventory not found [17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#metal=aluminium not found I want every block to use the same texture, but only change it's color using the colorMultiplier method. So I looked around, and I think I have to use 'state mappers' to point every IBlockState to the same model instead of it looking for all different models in the blockstate file. Am I right in that? If so, how do I use those 'state mappers'?
-
You really underestimate the amount of code needed. It is just not 'some lines of code'. BTW, next time, please don't reply to a thread which is 6 months old, thank you.
-
1.7.10-Setting a players starting worlds
larsgerrits replied to Elrol_Arrowsend's topic in Modder Support
You can use the WorldEvent.Load event, and in the event use World#setSpawnPoint(BlockPos) to set the spawn point. You can get the highest block at the position using World#getTopSolidOrLiquidBlock(BlockPos) .