Everything posted by Draco18s
-
[1.12] Help registering a block
You don't have a ModelRegistryEvent, meaning your block in the inventory will be black and purple.
-
How to use Capabilities?
The wrongest terminology. Capabilities are how the data is stored during runtime. Json, txt, and NBT are all disk storage formats.
-
[1.12] Help registering a block
Registry name needs to be all lower case. Unlocalized name should contain your mod ID, most people do this by setting the registry name and then calling setUnlocalizedName(getRegistryName().toString())
-
Best option for rendering a modular block?
TESR should only really be used if the model animates. I can't really advise on how best to proceed trying to do this with JSON models, but if you do go TESR, go FastTESR.
-
[1.10.2] NullPointerExeption when using onItemRightClick
Your NPE is on this line: MinecraftServer mcServer = player1.getServer();
-
Set Attack Damage and Speed based on NBT
When the item stack is created you need to set the attribute modifiers (attack damage and attack speed). Anytime you update the NBT to have a different value, you would have to update the attributes as well.
-
Get a list of every entity registered and know if it is a mob?
That's the worst idea. All of those instances would then need to be garbage collected.
- [1.10.2] Disabling crafting recipe for certain players
- [1.10.2] Disabling crafting recipe for certain players
-
Get a list of every entity registered and know if it is a mob?
https://stackoverflow.com/a/8851063/1663383
-
1.12.1 Tile Entity Not Working
Yes. That is precisely what I am saying.
-
1.12.1 Tile Entity Not Working
Sorry, it's createTileEntity.
-
Get ItemStacks used in crafting?
You need a custom IRecipe implementation. Have a look at Choonster's testmod3, you'll want to look at the gold armor upgrade things. Pay special attention to the _factories.json file.
-
1.12.1 Tile Entity Not Working
Most block methods are deprecated but that's irrelevant as the point of deprecated methods is "do not invoke" which says nothing about overriding (that is: if you want to know about a block, as its IBlockState object, not the block).
-
1.12.1 Tile Entity Not Working
Do not use ITileEntityProvider. It is old, out dated, bad, and broken. Just use the hasTileEntity and getTileEntity methods already available in the Block class.
-
Custom GUI wont show 1.12
someTileEntity.hasCapability(...) someTileEntity.getCapability(...) https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/entities/TileEntitySifter.java#L135-L158 http://mcforge.readthedocs.io/en/latest/datastorage/capabilities/
-
Custom GUI wont show 1.12
ISidedInventory extends IInventory
-
Custom GUI wont show 1.12
Caused by: java.lang.NullPointerException at net.minecraft.item.ItemStack.areItemStacksEqual(ItemStack.java:432) ~[ItemStack.class:?] You have a null item stack somewhere.
-
Custom GUI wont show 1.12
remove the isRemote check
-
Custom GUI wont show 1.12
Found the problem: if (!world.isRemote) { TileEntity te = world.getTileEntity(pos); if (!(te instanceof TileMyFurnace)) { return false; } player.openGui(MyBlocks.instance, Reference.MY_GUI, world, pos.getX(), pos.getY(), pos.getZ()); } You need to open the GUI on both sides.
-
[1.12] Making items in 1.12?
wrench = new ItemBase("wrench").setCreativeTab(CreativeTabs.WHATEVER); No override needed.
-
[1.12] Making items in 1.12?
You can turn the resource location into a string. The point is to get your mod ID into the unlocalized name as to avoid name conflicts (language entries are NOT mod specific). e.g. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/EasyRegistry.java#L95 Hmm... There's no need to override setCreativeTab: https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/common/item/ItemBase.java#L27 Just call it in the item's constructor with whatever tab you want. Not seeing any other issues, though.
-
[1.12] Making items in 1.12?
Question, why do you pass this off to the item only to have the item pass it back to the registry class? https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/Registry.java#L45-L54 You could just call registerItemModel(wrench, 0, new ModelResourceLocation(wrench.getRegistryName(),"normal")) Also: https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/common/item/ItemBase.java#L14 NO. BAD. There is no reason save this. https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/common/item/ItemBase.java#L18 setUnlocalizedName(getRegistryName()) https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/Registry.java#L46 This event is client-side-only: https://github.com/AnZaNaMa/Modularity/blob/master/src/main/java/com/anzanama/modularity/Registry.java#L10
-
[SOLVED] TileEntity nbt not working
Um...
-
[1.11.2] Removing blocks when picked from the world
That's fine, but there's still no reason to screw around with which hotbar slot is selected.
IPS spam blocked by CleanTalk.