-
Posts
169 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Zeher_Monkey
-
Yeah I just saw that line. I don't think it was having much of an effect, the only thing in that data (at least the read/write to NBT data) was a single ItemStack. New code:
-
Okay, i will just send the relevant energy level, instead of writing the whole EnergyStorage object to NBT.
-
Never mind, got it Put it in the ::onDataPacket() method. Cheers for the help!
-
Makes sense, silly question: Where is best to do that in a TE? I have real trouble with this server/client side stuff.
-
Thank you very much. I remembered I have used this previously but did not fully understand it then. I understand it better now, and have made some head-way. I have managed to get the change implemented using a Container and the methods suggested above. However when the World::notifyBlockUpdate() is called, I am seeing the update with WAILA (and the F3 menu), but the block itself is still requiring me to actually place a block next to it to update the texture / model. Added to my TE class: EDIT: I am using the container because I have added a GUI to the block.
-
So i want to display on the block the power level with different textures. I have the textures, the blockstates and everything registered and ready to go. If i manually enter the different values into getActualState(IBlockState state, IBlockAccess world, BlockPos pos); Then the block switches the textures over no problem. However, i am using the RedstoneFlux API, and when i try to access the power level from the getActualState(IBlockState state, IBlockAccess world, BlockPos pos); method, it always returns 0. No matter what i try. I have also tried using the getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos); method as well to no avail. TileEntitySynthesiser.java BlockSynthesiser.java Help would be greatly apprecieted
-
So that nbt string is setting the creator_name when saving to NBT. this.getNBT().setString(NBT_GENERATED_KEY, name); NBT_GENERATED_KEY is just an identifier to use on both sides of writing to and reading from NBT. Basically i need to see data from the tile_entity in the gui. I have a container, but the methods inside container are not suitable for updating a String, and certainly not an ArrayList<String>. Those methods, such as updateProgressBar() etc are only suited to sending integer values. When i call the method to set the data, is called on the server side. I have tried various methods to set it on the client & server side to no avail. I have also tried a custom packet for the client side, but it does not set the client-side value. Unless the container can somehow update the values i need im stumped.
-
So I have a method for setting information inside a tile_entity. When i set this information (String and ArrayList<String>) it sets it on the isRemote = false side so the server side. The gui needs to see the isRemote = true side to show the information. I have been trying to get the information from the server to the client but dont fully understand sending a server > client packet with this information. I have also tried to use IContainerListener as well but this cannot work with a String and certainly not with a ArrayList<String>. I have also tried to change where the method to set these values is called with no luck. Gui Class: [GuiPocketAllowedPlayers] The specific lines getting the information are: tile.getPocket().getAllowedPlayers() This returns an ArrayList<String>. tile.getPocket().getCreator() -- This returns a String. This is where im actually setting the information: [TileEntityDimensionalPocket] These lines set the information. this.getPocket().setCreator(playerIn.getName()); NetworkHandler.sendPocketSetCreator(playerIn.getName(), pos); Here is where the information is ultimately set: [Pocket] I want the information to be displayed so i can see a list of players and be able to add / remove them. The adding and removal is sorted, its just the display of them, especially after exiting and returning. Basically i need to send a packet back to the client to update that information both server and client side. I have the server side done, but im lost on how to send that information to the client side of the tile entity.
-
Issue resolved. This code: byte[] byteArray = new byte[256]; Arrays.fill(byteArray, (byte) PocketBiomeHandler.getPocketBiome().getIdForBiome(PocketBiomeHandler.getPocketBiome())); Ending up calling an abstract method. Didnt see it until i rooted around, as that code is called during setup. Replaced it with: byte[] array = chunk.getBiomeArray(); for (int i = 0; i < array.length; i++) { array[i] = (byte) PocketBiomeHandler.getPocketBiome().getIdForBiome(PocketBiomeHandler.getPocketBiome()); } And all is fixed.
-
Here is the latest.log
-
GlStateManager errors (StackOverflow 1284)(SOLVED)
Zeher_Monkey replied to Mambo_Dancer's topic in Modder Support
You never GlStateManager.pushMatrix(); Before you render. -
So I'm getting a java.lang.abstractMethodError when i compile my mod and run it on a proper client. My Eclipse runs it perfectly without any issues. Pocket.class#generatePocketRoom Specifically pointing to this line: Chunk chunk = world.getChunkFromChunkCoords(chunkPos.getX(), chunkPos.getZ()); Any ideas? I haven't run into this before. Any help is much appreciated!
-
Custom fluid rendering in world as water. [1.11.2]
Zeher_Monkey replied to Zeher_Monkey's topic in Modder Support
Yeah i dont know what thats pointing to. I have So why is it saying expected string... -
Custom fluid rendering in world as water. [1.11.2]
Zeher_Monkey replied to Zeher_Monkey's topic in Modder Support
The updated block_fluid.json Has caused this error: -
Custom fluid rendering in world as water. [1.11.2]
Zeher_Monkey replied to Zeher_Monkey's topic in Modder Support
I should clarify. I understand how to lay out .json files, but all of the forge#'blockstate' For example: forge:fluid A list of all forges blockstates would be nice. I havent managed to fin one yet, but if one exists ill definitely take a look. -
Custom fluid rendering in world as water. [1.11.2]
Zeher_Monkey replied to Zeher_Monkey's topic in Modder Support
Okay. This any better? I still don't fully understand the .json format. I've just gleamed from open source mods and tutorials. The forge documentation is lacking imo. -
Custom fluid rendering in world as water. [1.11.2]
Zeher_Monkey replied to Zeher_Monkey's topic in Modder Support
So is that my issue? Because if so, i can wait until i update to use registry events. -
Custom fluid rendering in world as water. [1.11.2]
Zeher_Monkey replied to Zeher_Monkey's topic in Modder Support
Yeah i know. I haven't changed over yet because i still don't understand the registry system. I will get around to it. -
Custom fluid rendering in world as water. [1.11.2]
Zeher_Monkey replied to Zeher_Monkey's topic in Modder Support
Im registering blocks using GameRegistry#register(object); In my mods #preInit(); Function. Would having an individual .json file fix the issue? Or is it more complicated than that? -
Remove the JsonLootBags mod.
-
Custom fluid rendering in world as water. [1.11.2]
Zeher_Monkey replied to Zeher_Monkey's topic in Modder Support
Can anyone else help?