Everything posted by Draco18s
-
An ItemStack of cake
(getPickBlock is probably going to be the more useful option in the general-case)
-
[1.9] help understanding this error with blockstates
if(blockBlock instanceof MyAbstractWall || blockBlock instanceof BlockWall) { }
-
[1.9] Registering an Item.
Use setRegistryName the way it was intended to be used. Do not use the 2 parameter overload of GameRegistry.registerItem: your registry name should not be derived from your unlocalized name, as unlocalized names are allowed to change but registry names are not.
-
(fixed) (1.8.9)Model definition for location *item* #inventory not found
You do. It is because it allows for "technical" blocks to exist without them having an inventory object. (e.g. I don't think you can get Fire as an item in your inventory any more)
-
[1.9] Forge API of some sort? [UNSOLVED + A few questions]
You haven't included enough code to be able to figure out what that snippet is doing. You haven't shown the rightClick method where you obtain the BlockState and pass it to this recipe method, or what one of the recipes looks like.
-
JSON model editor
I think he has a JSON file that he wants to import and tweak.
-
teleportation
This does not get the player's coordinates. This moves the player to a location (x,y,z) player.getPlayerCoordinates().posX = x; player.getPlayerCoordinates().posY = y; player.getPlayerCoordinates().posZ = z; This also moves the player player.setPosition(x, y, z);
-
[SOLVED] [1.7.10] Player kicked with NullPointerException on block break
Hmmm, sorry about that. There is an event that does what I said. Not that one then, hum. What is the line of code at ForgeHooks.java line 459? That'll help narrow down what was null, even if it isn't your code: you'll be able to figure out--by working backwards--what it was that your code did to cause it.
-
[SOLVED] [1.7.10] Player kicked with NullPointerException on block break
BreakEvent is fired when any block is broken by any means. Read the javadoc. What happens if water pours on the ground and encounters tall grass?
-
[1.9] help understanding this error with blockstates
No. jeffryfisher was saying that Mojang should have created the abstract BlockWall class from which the variants would be extended from. What he said you should do is create an abstract class to extend from Block.
-
forge_marker in blocktypes json how would I implement it in this case?
Dude. How are you handling all those states? You haven't have more than 16 variations that save to metadata. You've got NINE types of leaves that you're trying to squeeze into 2 bits of metadata (4 variations). Your problem is likely not in the JSON file at all, but in the stateToMeta and metaToState methods.
-
[1.8.9] [Solved] Need help making an automated method
Yes. It's an instance of MyWall.
-
[1.9] Forge API of some sort? [UNSOLVED + A few questions]
Any idea why not doing it would have the effect it--- Oh! I think I remember something about this now: the container item is constantly requested while the UI is open and if you modify the stack in the grid, as opposed to a copy, it ends up overwriting itself until it gets destroyed. (Recipes are weird)
-
[1.8.9][SOLVED] Custom colorable armor render with color like leather armor?
Ah, yes. That bit
-
[1.8.9][SOLVED] Custom colorable armor render with color like leather armor?
Hmm, darn. I remember having to struggle with that back in 1.7 when I originally added the armors. I've forgotten what made it finally work, though.
-
[1.8.9][SOLVED] Custom colorable armor render with color like leather armor?
I think this is the method you are looking for. https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/item/ItemArtifactArmor.java#L549-L553 It apparently wasn't deobfed in 1.7.10, but it might give you a lead.
-
[1.9] [Solved] Render top of Block in Tile Entity
1.7, pretty easy. 1.9? Fuck if I know if its even possible. *cough, the whole json model thing being arcane*
-
[1.7.10] Problem with TNT.
You meant "onBlockPlacedBy" not "onPlacedBlockBy" which is why I couldn't find it. You might want to look into what the flags (last parameter of setBlockMetadataWithNotify) does. Also, I helpfully reported you to the moderators as per my sig.
-
I think of updating my (very) old mod to 1.9. I need you guys' opinion on this
Oh god, link that somewhere.
-
[1.9]Burning Blocks
I have no idea what the hell is so hard about just following directions. Reading is hard. Yo.
-
Gui Slots
How to add a slot https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/inventory/ContainerPedestal.java#L17 And the custom slot class https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/inventory/SlotArtifact.java
-
[1.9] Forge API of some sort? [UNSOLVED + A few questions]
Fur the love. That means the itemstack size is 0. ItemStacks can't set themselves to null, it's up to the container/itemUse method/whatever method to detect stacksize of 0 and remove it from there. Try this: public ItemStack getContainerItemStack(ItemStack stack) { stack.damageItem(1,null); if(stack.stacksize <= 0) stack = null; return stack; } (It literally doesn't matter if you check stack.getItem() == this because it should always be this, if it isn't, that's a serious bug in vanilla that makes no god damn sense and should never happen, because the getContainerItemStack() is invoked by doing stack.getItem().getContainerItemStack(stack) : the stack invokes its own item's method, passing itself).
-
[1.7.10] Problem with TNT.
By the way, onPlacedBlockBy is not in the code you posted. I ctrl-F'd and don't see it.
-
[1.9] Forge API of some sort? [UNSOLVED + A few questions]
The answer is both: a) in the content of that method which you have omitted and b) the itemstack has a size of freaking zero, what did you expect vanilla to do with it when you tried to pick it up?
-
[1.7.10] Problem with TNT.
What does this do in your class? private static final String __OBFID = "CL_00000324"; Bet you have no idea. Bet $1000 you don't even need it. (Also: I'd win that bet, hands down no questions asked because it's used by MCP to reobfuscate vanilla classes.)
IPS spam blocked by CleanTalk.