Abastro
Forge Modder-
Posts
1075 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Abastro
-
Does that related with commented lines? Or did you keep it commenting when you got the issue?
-
[1.7.10] [SOLVED!] Trouble removing drops from a block
Abastro replied to HappyKiller1O1's topic in Modder Support
That's not only the problem. There are tons of blocks added by mods works like lapis. Also, some of them uses HarvestDropsEvent, so you should fix lots of the logic. (As you want it to have fortune effects, etc.) -
[1.7.10] [SOLVED!] Trouble removing drops from a block
Abastro replied to HappyKiller1O1's topic in Modder Support
That's the problem that I exactly wanted to say. Your logic breaks there. And, with the code, breaking lapis lazuli would give you the lapis lazuli block. Is that what you want? -
Where do you changes the color to green? I cannot find it. Does that related with commented lines?
-
[1.7.10] [SOLVED!] Trouble removing drops from a block
Abastro replied to HappyKiller1O1's topic in Modder Support
So what do you want is silk touch+auto smelting? But still, there are many problems. You are not dropping anything if the hammer does not have Auto-Smelting trait. -
[1.7.10] [SOLVED!] Trouble removing drops from a block
Abastro replied to HappyKiller1O1's topic in Modder Support
Read the 'edit'. -
Please let us know that how you call the method 'draw'/
-
[1.7.10] How to get the XP of a Furnace Recipe?
Abastro replied to HappyKiller1O1's topic in Modder Support
So console prints "XP: 0.0"? I think it is impossible. -
[1.7.10] [SOLVED!] Trouble removing drops from a block
Abastro replied to HappyKiller1O1's topic in Modder Support
You should remind that the code would be incompatible with many mods. (edit) Many mods uses Block#getDrops(...) and HarvestDropsEvent to modify the drops, but your code just smelts the block and drop it. Do you want your tool to be silk touch with auto-smelting? -
Hm, how do you draw the objects? The code only contains code drawing single gui.
-
[1.7.10] How to get the XP of a Furnace Recipe?
Abastro replied to HappyKiller1O1's topic in Modder Support
The code should work. What was the block? -
The GuiDogInfo#player field would be null. Where is the constructor called? GuiHandler? Please post the code.
-
[1.7.10] [SOLVED!] Trouble removing drops from a block
Abastro replied to HappyKiller1O1's topic in Modder Support
Use Block#harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) to drop the block drops. Remind that Block#getDrops(...) just gets the new instance of the drops. Using the Block#harvestBlock(...), you can use BlockEvent.HarvestDropsEvent to check and smelt the drops. -
You didn't save the NBT for "Owner" in writeEntityToNBT, so fix that.
-
[1.7.10] [SOLVED!] Trouble removing drops from a block
Abastro replied to HappyKiller1O1's topic in Modder Support
This code makes it nothing to clear the drops. ArrayList<ItemStack> drops = block.getDrops(world, actualX, actualY, actualZ, meta, EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, stack)); A new instance of drops is made there, so changing that has no effect! You cannot change drops in the Item#onBlockDestroyed(...). You should subscribe to the BlockEvent#HarvestDropsEvent. + 'it doesn't register the blocks I destroy through my class' means there is something wrong with your logic. What do you mean by 'destroy through my class'? If you are trying to break blocks within your logic, Please post relevant code. -
I know that would work, but it causes a block 'blip' meaning the client still breaks the block, then puts it back when the server tells the client it is still there. Would you know how to fix that? PlayerInteractEvent is called before client clicks and breaks the block. So you can just cancel the event when you extinguishes the fire.
-
1. Update the code to your current state. 2. You should also change the name of folder your resources are in.
-
Then save the player's nickname and UUID, and loads the owner instance when he logs in. (Or in readNBT alongside) (Or it can also be Entity, since entities have UUID and displayname too)
-
[UNSOLVED][1.7.10] Rendering custom entity texture
Abastro replied to PhantomTiger's topic in Modder Support
You are not drawing anything in the PapPapRender class. You have to understand what RenderPainting#func_77010_a does, and write the similar code for rendering. -
Forge automatically extends the limit using ArrayCopy. Since WorldType is only effective on server side, there is theoretically no limit for WorldType. So don't worry about that.