Everything posted by Draco18s
-
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.
-
[1.11.2] Removing blocks when picked from the world
Again, for what reason? You're completely screwing with what the player expects to happen. What if the item is picked up but the hotbar is full? What if the player wants to place more than one block at a time?
-
[1.10.2] Logging
- Custom GUI wont show 1.12
What have been the results of your debugging? Do any of your print statements fire? Have you tried using the debugger?- [1.11.2] Removing blocks when picked from the world
Don't try to limit resources in creative mode.- Custom GUI wont show 1.12
Not sure, but I do see this: new BlockPos(this.pos.getX(),this.pos.getY(),this.pos.getZ()) Really? this.world.getTileEntity(this.pos) was too hard? - Custom GUI wont show 1.12
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.