Everything posted by poopoodice
-
[1.16.4] How i can make a own inventory
Your packet, and then you can call NetworkHooks#openGui in PacketSpawn::handle when you have received the packet
-
[1.16.4] How i can make a own inventory
You already got it didn't you 🙃
-
[1.16.4] AttributeModifierMap.MutableAttribute setCustomAttributes
You can always change their base values afterwards e.g. in MobEntity#onInitialSpawn.
-
Sending server data to the client for rendering
As far as I know, no. And it's really not that complicated.
-
Sending server data to the client for rendering
Well...https://github.com/skiprocks999/Rings-of-Infinity/blob/Rings-Of-Infinity-1.16.4/RingsOfInfinity/src/main/java/com/contInf/ringsOfInfinity/client/renderer/WardingBeaconTileEntityRenderer.java#L43 You’ve never write those data in the packet sent to the client.
-
Sending server data to the client for rendering
I believe you have already setup the synchronization between server and client correctly, you just did not write any data that is going to be used for rendering into the tag.
-
[1.16.4] How to use TickEvent.ClientTickEvent ?
How do you register the event?
-
Creation/registering of recipes for custom machines (1.15.2)
I've never done similar things before but by looking at some codes it seems like you will need a recipe that implements IRecipe, an registered IRecipeType which is the place you get the recipes from, and a registered serializer using RegistryEvent.
-
Creation/registering of recipes for custom machines (1.15.2)
You will need to make your own registered recipe type.
-
How can I show an empty gui by key pressing
I just noticed that the titles are actually rendered in drawGuiContainerForegroundLayer() not render(). Also I believe you only need to set the value once in the constructor, or in init().
-
How can I show an empty gui by key pressing
Don't call super and render it yourself, or just not render it.
-
How can I show an empty gui by key pressing
Where will you be storing things at? Is it going to be saved per player, or itemstacks? Both of them can use capabilities. https://mcforge.readthedocs.io/en/latest/datastorage/capabilities/
-
How can I show an empty gui by key pressing
What is an empty gui? If it does not store any information (e.g. inventories, sharing data) a simple screen will work using Minecraft#displayGuiScreen (this is client only). Otherwise you will need a registered container and screen, and open it with NetworkHooks#openGui (this should be done on server, in this case you send a packet when the key is pressed). There's a key input event that you can use, or use client tick event to proceed with keybindings (check Minecraft.java).
-
Event Won't Spawn Projectile
Annotations does not do that. https://mcforge.readthedocs.io/en/latest/concepts/sides/#fmlenvironmentdist-and-onlyin What you are looking for is packets.
-
Make player stand on custom entity
I'm not so sure but maybe try override Entity#applyEntityCollision and just do nothing in it.
-
Getting item when middle clicking entity [1.16.4]
IForgeEntity#getPickedResult
-
Getting Entitys in Renderer
Check IEntityAdditionalSpawnData
-
[1.16.4] Random Item texture based on an NBT tag
If there's only small amount of textures/models, just use ItemPropertyOverrides: https://mcforge.readthedocs.io/en/latest/models/overrides/ the doc is currently on 1.15, in 1.16 instead of adding it in item's constructor or so, you need to add the property override to ItemModelProperties in client setup via ParellelDispatchEvent#enqueueWork. IItemPropertyGetter provides the stack where you can get its "Rarity"
-
[1.16.4] Why is there an ITEM in the DESTROY ITEM box?!
Well, in the image why is your item in the "destroy slot"?
-
[1.16.4] PlayerRenderer add Layer
You are creating a new renderer and just add a layer to it, what's it gonna do? Use the existing renderer that is bound to the player.
-
[1.16.4] Remove 1 item in offhand ItemStack when an event fires.
What you are looking for is ItemStack#shrink Other methods like grow and setCount should work as well.
-
Projectile Keeps Duplicating Itself (1.16.4)
Maybe just create a boolean in the the entity class and set it to a value when it is created by other projectile, then use it to decide whether it should create more projectiles when removed?
-
[SOLVED] [1.16.4] Different ways to spawn a dropped item during an event
Sorry I just had a look the event is actually triggered on both sides, you just need to check for !World#isRemote for server side then it should be fine.
-
[SOLVED] [1.16.4] Different ways to spawn a dropped item during an event
You've only create an instance of ItemEntity, use World#addEntity to add it to the world. Also it should be done on server side, where iirc the event you are using is client only, you can use onBlockActivate in your block class, otherwise send a packet.
-
[Solved][1.16.4] How do I correctly sync capability data between Client and server?
The data are being read/write when world is loading/saving, if there's something wrong with it the whole thing is messed up.
IPS spam blocked by CleanTalk.