Everything posted by Zeher_Monkey
-
[1.12.2] Blockstate
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:
-
[1.12.2] Blockstate
Okay, i will just send the relevant energy level, instead of writing the whole EnergyStorage object to NBT.
-
[1.12.2] Blockstate
Never mind, got it Put it in the ::onDataPacket() method. Cheers for the help!
-
[1.12.2] Blockstate
Makes sense, silly question: Where is best to do that in a TE? I have real trouble with this server/client side stuff.
-
[1.12.2] Blockstate
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.
-
[1.12.2] Blockstate
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
-
Set client and server value of a tile_entity using packets[1.12.2]
Ok i have seen this in some tutorials. I'm again not sure how to use these functions. I cant see a way to send a string or ArrayList<String> with these functions. And once sent, how to i get the information from the fromBytes() into my tile_entity fields?
-
Set client and server value of a tile_entity using packets[1.12.2]
Ah I see. I have removed this line. Here is my client packet: And my server packet:
-
Set client and server value of a tile_entity using packets[1.12.2]
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.
-
Set client and server value of a tile_entity using packets[1.12.2]
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.
-
Can't get past loading screen with any version. Please help
No problem!
-
Abstract method error (SOLVED)
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.
-
Can't get past loading screen with any version. Please help
This may sound really strange but do you have discord? Discords push to talk may mess things up. Also if not try the alternative / old launcher. https://minecraft.net/en-us/download/alternative
-
Abstract method error (SOLVED)
Here is the latest.log
-
GlStateManager errors (StackOverflow 1284)(SOLVED)
You never GlStateManager.pushMatrix(); Before you render.
-
Abstract method error (SOLVED)
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]
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]
The updated block_fluid.json Has caused this error:
-
Custom fluid rendering in world as water. [1.11.2]
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]
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]
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]
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]
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?
-
Forge keeps crashing
Remove the JsonLootBags mod.
-
Custom fluid rendering in world as water. [1.11.2]
Can anyone else help?
IPS spam blocked by CleanTalk.