Everything posted by Animefan8888
-
[1.12] Attaching Capabilities to an Item
Capabilities make everything more organized, it becomes much easier to interface with.
-
[1.11.2] Help with custom TNT
Yes, the other one would have worked just as well, but the parenthesis did not need to be there. How much experience do you have with Java?
-
[crash]
Look at the bottom where it says Common Mistakes.
-
[1.11.2] Help with custom TNT
That works, but why are there parenthesis around the block.getRegistryName() (Uneeded)
-
[crash]
Take a look at this.
-
[1.11.2] Help with custom TNT
block.getRegistryName returns a ResourceLocation so you don't do new ResourceLocation(block.getRegistryName)
-
[1.12] Attaching Capabilities to an Item
Attaching Capabilities is just like registering an Item pretty much. You are telling the game that the Entity, ItemStack, etc will have it. When this is called the object does't exist. So data cannot be saved to it. The data needs to be added specifically to each ItemStack in this case and is different between all of them. The Capability is not saved to the Item for this reason as they as well as Blocks are singletons.
-
[1.10.2] RetroGen Assistance
ChunkEvent.Load is called whenever the chuck is loaded, when it is first generated to when it is reloaded from disk. ChunkDataEvent.Load is for when the Chunk is loaded from disk used for saving infomation to a chunk. And you should be using ChunkEvent.Load.
-
[1.11.2] Help with custom TNT
Instead of using 'modid', block.getUnlocalizedName().substring just use block.getRegistryName() which should be lower case anyways.
-
[1.11.2] Help with custom TNT
Is there anything in the console? And just to clarify the only problem is with the item? If so show where you register the model in code.
-
[1.12] Attaching Capabilities to an Item
Ahhh, shift clicking the item out of the crafting table doesn't work while editing the result through the event. This is a problem with the Container#mergeItemStack because it uses ItemStack#copy and places that into the new slot or just modifies the current slot with a matching item. This can be 'fixed' by overriding the Items using substitution, using the Right Click/Player Tick, or whenever the vanilla ContainerWorkbench opens replace it with your own version that overrides the mergeItemStack method and applies the data to the stack when it comes out of the result slot or even using a custom Slot for the result instead of the vanilla one which will allow you to modify the Stack any way you want.
-
[1.11.2] Help with custom TNT
It says blocks and Nuke is capitalized.
-
[1.11.2] Help with custom TNT
Now you need a variant called "explode=false" and another called "explode=true", because you have two BlockStates one where the value is true and the other where it is false.
-
[1.12] Attaching Capabilities to an Item
You can most definitely attach NBT data or Capability Data to ItemStack in the PlayerEvent.ItemCraftedEvent. Then there is the PlayerInteractEvent if you want to do a Right Click bind, ItemCraftedEvent for when it is crafted, or the TickEvent.PlayerTickEvent for when the item is held.
-
[1.11.2] Help with custom TNT
Does it work?
-
Item texture not loading
You must register your models in the ModeRegistryEvent with ModelLoader.setCustomModelResourceLocation().
-
[1.11.2] Help with custom TNT
"normal" specifies a variant, each variant can only have one model, and multiple submodels. It is also missing a "inventory" variant. And the "y": num is specifying a rotation which is pointless unless your block is rotatable like a furnace.
-
[1.12] Attaching Capabilities to an Item
You could get the player in many ways, you could have it linked to a certain character upon creation (Item#onCreated) which could be reset by placing it back into a crafting table (Custom IRecipe implementation) or on right click (Item#onItemRightClick) you could bind it, or even as soon as it is held in the players hand via Item#onUpdate.
-
[1.11.2] Help with custom TNT
Sadly it wasn't the main error. The problem is with your BlockState JSON. Check this out it will help you understand them a lot better, and if you have any questions after come back and ask.
-
[1.11.2] Help with custom TNT
The BlockState path doesn't have a blocks folder in it, and all of the model paths have a block and item folder, but not a blocks and items folder.
-
[1.12] Attaching Capabilities to an Item
If you use the Forge provided ItemStack sensitive version of getAttributeModifiers you get an ItemStack parameter. With an ItemStack parameter you can use ItemStack#getCapability in which you could get the data. And in what way would you need the player? The AttachCapabilityEvent is indeed the way to register it.
-
[1.10.2] RetroGen Assistance
If I remember correctly Forge doesn't have any Retrogen API so to say. I think the only way to do this would be to subscribe to the ChunkEvent.Load event and save that to the disk somehow and load chunks from that file into a List. Cross reference that list in the Load event and then generate the ores if it is not in that list.
-
[1.11.2] Help with custom TNT
Your paths are wrong, Item Model: assets\'modid'\models\item Block Model: assets\'modid'\models\block BlockState: assets\'modid'\blockstates
-
[1.10.2] [1.11.2] Implementing block models larger than 2x2x2 using a TESR
You will have to make multiple blocks because Minecraft doesnt handle Collision boxes greater than 1x1x1 and fence had to go through so much stuff just to handle a height of 1.5.
-
Removing an item from an itemStack from the NBT
Does it have to be with the NBTTagCompound? Why cant you just use an ItemStack variable? And if you need to figure it out and use NBT then just look at the ItemStack constructor that takes in an NBTTagCompound and only an NBTTagCompound or the writeToNBT method.
IPS spam blocked by CleanTalk.