Everything posted by Choonster
-
getServerGuiElement
You passed an invalid or null value as the mod argument of EntityPlayer#openGui . This probably means you didn't annotate your mod's instance field with @Instance or you used the wrong mod ID in the annotation.
-
getServerGuiElement
If your GUI has no Container , return null from IGuiHandler#getServerGuiElement and only call EntityPlayer#openGUI on the client. If it's crashing, post the crash report and your code.
-
[1.9.4] Deprecated Methods in Blocks
Adding @SuppressWarnings("deprecation") to my overrides of the deprecated Block methods definitely stops them displaying as deprecated. I'm using IDEA.
-
ArmorMaterial crashes
EnumHelper.addArmorMaterial had the toughness parameter added a while back, make sure you're using the latest version of Forge.
-
[1.9.4]Player immune to damage from Wither
Subscribe to LivingAttackEvent , check if the entity is wearing your armour and the DamageSource is DamageSource.wither and cancel the event.
-
[SOLVED] Some questions about capabilities
Packets are handled on a separate thread in 1.8+, so you need to schedule a task on the main thread before you can safely interact with game objects. This page explains more. If scheduling a task on the main thread doesn't fix this, post your new code. The client player is created and spawned when the client receives SPacketJoinGame from the server. The server sends this before spawning the player, so it should usually be received before a packet sent from EntityJoinWorldEvent .
-
[SOLVED] Some questions about capabilities
EntityJoinWorldEvent is fired for all entities, not just players. Check if the entity is a player before trying to retrieve the capability. If it still doesn't work, post your code.
-
[SOLVED] Some questions about capabilities
Capabilities are only attached and read from NBT after AttachCapabilityEvent has been fired. You should send the packet from EntityJoinWorldEvent . To make the capability persist through respawning, subscribe to PlayerEvent.Clone and copy the capability's data from the old player to the new one.
-
[1.9.4] Redstone connecting to custom bluestone
Nobody said anything about canConnectToRedstone , the method is called canConnectRedstone .
-
[1.9.4] Redstone connecting to custom bluestone
Override the method in your class. It's not hard.
-
[1.9.4] Redstone connecting to custom bluestone
Redstone won't connect to your block if you return false from Block#canConnectRedstone . This is what diesieben07 has been telling you.
-
1.9 Server Mod
NBT is only for storing data on disk, don't use it to store data at runtime. Your WorldSavedData should store the data as objects and only use NBT when reading from/writing to the save. The data should be stored in a non-static field so each instance of the WorldSavedData has its own copy. Your actual problem is that you're using the Minecraft class all over the place; it's a client-only class, it can only be used in client-only code. displayResults should take an EntityPlayer argument and send the messages to it. SupernaturalItemsEvents#onItemRightClick should pass its own EntityPlayer argument to displayResults .
-
1.9 Server Mod
Line 80 of SPNWorldSavedData is either using the Minecraft class (which is client-only) itself or trying to call something that uses it. If you want more help, post your code. Without seeing your code, all we can do is give you general advice like reading up on sides here.
-
[SOLVED] [1.9] Lag whilst get closer to texture
There are two instances of RenderPlayer , one for the Steve model (thick arms) and one for the Alex model (thin arms). Your current code will only add the layer to the first one that renders. In postInit, you should iterate through RenderManager#getSkinMap and add the layer to every RenderPlayer instance in the map. Don't use RenderPlayerEvent here at all.
-
[SOLVED] Forge 1.9 - TileEntitySpecialRenderer - Rendering with VertexBuffer
Bounding boxes are still handled in code. Override Block#getBoundingBox to return your block's bounding box.
-
[SOLVED] [1.9] Lag whilst get closer to texture
Without seeing your code, all we can do is guess at possible causes. Post your code.
-
Is there any logic?
I believe the build process appends the Git branch name to the file name when it's not master , so most of the early builds for a given version will have the suffix while the latter ones won't.
-
[SOLVED] Forge 1.9 - TileEntitySpecialRenderer - Rendering with VertexBuffer
Create a JSON model in a program like MrCrayfish's Model Creator or an OBJ/B3D model in a mainstream 3D modelling program like 3ds Max or Blender and use the standard baked model system used by most blocks/items. Block models are specified by blockstates files. I have an explanation of the model loading process here.
-
[1.9] Custom Capabilities and Networking
I assumed each player would have their own quest progress (or progress shared in a party) like HQM, so I told you to use a capability. If the progress is global, world saved data is the correct choice.
-
[1.9.4] Tile NBT
TileEntity#getTileData is for storing external data on a TileEntity , it doesn't contain the TileEntity 's own data. Use INBTSerializable#serializeNBT (inherited by TileEntity ) to write an INBTSerializable object to NBT.
-
java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityClientPlayer
The error occurs when FML attempts to load your proxy class before creating an instance of it, so your server proxy is trying to use a client-only class.
-
[1.8.9] Troubles with texture handling in Blockstate
The vanilla blockstates format (which you're using) doesn't support retexturing models, you need to use Forge's format for that. This will also let you set the textures and model based on the index property and the rotation based on the direction property instead of having to specify every combination of property values yourself.
-
1.9 NBT Data
Quest progress should probably be saved using a Capability attached to the player, not using World Saved Data. Whenever a value changes that the client needs to know about, send a packet to update it. The site I linked previously also has a section on networking, including the Simple Network Implementation (which you should use).
-
1.9 NBT Data
I answered this in your previous thread.
-
Trying to Host Custom Modpack
Better Sleeping is trying to use client-only code on the server. Report this to the author.
IPS spam blocked by CleanTalk.