Everything posted by Draco18s
-
[1.12.2]Grasscolor Override
I will point out that if your seasons change and thereby the color changes, the game won't rerender everything unless the chunk is already set to be rerendered (e.g. a block changes). Block colors aren't meant to be dynamic over time.
-
How does the Gui reference client side blocks, and how do client side blocks reference server side blocks?
You need to send packets. You send a packet on the click that tells the server "hey, this button was clicked." The server then makes sure you're looking at a chest, where it is, etc. etc. and then stores the information (which does not go into chunk NBT, because chunk NBT only exists during the save/load process).
-
give a target player potion effect onItemRightClick.
Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
-
[1.12.2] Add a custom shapeless crafting recipe using code involving potions
The NBT constructor is for capability NBT, it is not the same as the ItemStack's stackTagCompound field.
-
[1.8] LivingDropsEvent
Do not PM me to alert me to a post in your thread. It only makes me want to ignore you.
-
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
If you need your own custom slot class, extend SlotItemHandler. It already extends Slot for you and does 99% of what you need to interact with the ItemHandlerCapability in a GUI. Anywhere you are doing world.getTileEntity() and casting to IInventory. You instead call .getCapability() on the TE (instead of casting), passing in CapabilityItemHandler.ITEM_HANDLER_CAPABILITY object as the Capability to get. That capability is then the ItemStackHandler object that is your inventory (magic!). You would also pass in a side, but for GUI stuff, null is appropriate (represents "self" or similar, if you don't actually care about sided inventories, then it doesn't matter at all).
-
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
Your TE's slots only. The Player's inventory is still an IInventory.
-
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
Instead of using Slot you use SlotItemHandler and instead of casting to IInventory you use getCapability().
-
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
You don't need to check for a result every tick. You only need to do it when the inventory changes.
-
[1.12] Problem with PlayerInteractEvent.RightClickBlock
Two changes would make it really performant. 1) Declare the list once and save it to a field 2) Sort the list. If the list is sorted, you can use Arrays.binarySearch to get the index of the item (or a value less than zero, which indicates its not in the array). This form of searching the array is extra fast because it can take any sorted array and treat it as a binary tree, making fewer total operations. That said, I am not sure you can do a binary search on arbitrary types, but it might work.
-
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
If you're not cooking it over time, then you don't need ITickable.
-
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
Look at the furnace.
-
[1.11.2][UNSOLVED] Custom Crafting Block Not Crafting
At the top of your class add "implements ITickable" Let your IDE underline it in red. Pick the only suggested solution that makes any sense "implement the interface") One of the methods added automatically will be one called Update
-
Help with multi-textured blocks
This is because you're extending ItemBlock and not overriding getMetadata(), which is set to return 0 by default
-
[1.12.2] getEntitiesWithinAABBExcludingEntity() no longer detects EntityItem? Alternative?
Thanks for that. Checking my code I had 1 instance of "expand" that was improper.
-
[SOLVED][1.12.2] Trouble Ajusting the attack speed of an Item
You need to set a breakpoint, then run in debug mode. And that breakpoint should be inside getItemAttributeModifiers() in ItemHoe
-
[SOLVED][1.12.2] Trouble Ajusting the attack speed of an Item
You know how to use the debugger, right? It has nothing to do with the console...
-
[SOLVED][1.12.2] Trouble Ajusting the attack speed of an Item
Use the debugger, figure out why (when getItemAttributeModifiers() is called) that the speed value you want isn't being used.
-
[SOLVED][1.12.2] Trouble Ajusting the attack speed of an Item
The attack damage field isn't used by hoes: public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) { Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot); if (equipmentSlot == EntityEquipmentSlot.MAINHAND) { multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", 0.0D, 0)); multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", (double)(this.speed - 4.0F), 0)); } return multimap; }
-
Handling HTTP requests on minecraft port
It does. 1.7.10 is no longer supported here. Also there's probably a better way you can do what you want to do.
-
[1.11.2] [Solved]Custom GUI error: NullPointerException
Your inventory is size 3. this.addSlotToContainer(new Slot(tileentity, 0, 31, 24)); this.addSlotToContainer(new Slot(tileentity, 1, 66, 43)); this.addSlotToContainer(new SlotPestleOutput(player.player, tileentity, 3, 119, 30)); 0, 1, 3. Yes. That is how we count.
-
[1.11.2] [Solved]Custom GUI error: NullPointerException
-
[1.11.2] [Solved]Custom GUI error: NullPointerException
Or rather, show the TileEntity class
-
How to create custom 3D models with wavefront obj (in 1.10.2) ?
You need an item model that has a parent of the block model's json
-
How to create custom 3D models with wavefront obj (in 1.10.2) ?
How do you expect to display the item in the inventory? By registering an item model. And where do you think it goes to go find that model? At the resource location you give it. So what does it expect to find there? A JSON file.
IPS spam blocked by CleanTalk.