Jump to content

matt1999rd

Members
  • Posts

    133
  • Joined

  • Last visited

Recent Profile Visitors

5520 profile views

matt1999rd's Achievements

Creeper Killer

Creeper Killer (4/8)

3

Reputation

  1. Do you want to have a behaviour like the bucket item ? If it is the case you should look in the class BucketItem available using ctrl n with intellij. The function used is : Item#use.
  2. As I search in the minecraft code I could not find anywhere where the registry name is register before being destroy and replaced with default air block. I think it may be impossible to replace broken block in the game if the registry name has been removed
  3. Hello everyone, I try to use Tesselator class to render some icons on a screen. But it doesn't work and I don't see why because I am just using the same code as AbstractGui#innerBlit with float parameters. I linked here the texture of the icons to display and the texture of the gui container. here is the code of the class where the rendering is done : private void renderQuad(MatrixStack stack, Vector2f origin, Vector2f end, Vector2f uvOrigin, Vector2f uvEnd){ Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferbuilder = tessellator.getBuilder(); RenderSystem.enableBlend(); bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX); Matrix4f matrix4f = stack.last().pose(); bufferbuilder.vertex(matrix4f, origin.x, origin.y, (float)0).uv(uvOrigin.x, uvOrigin.y).endVertex(); bufferbuilder.vertex(matrix4f, origin.x, end.y, (float)0).uv(uvOrigin.x, uvEnd.y).endVertex(); bufferbuilder.vertex(matrix4f, end.x, end.y, (float)0).uv(uvEnd.x, uvEnd.y).endVertex(); bufferbuilder.vertex(matrix4f, end.x, origin.y, (float)0).uv(uvEnd.x, uvOrigin.y).endVertex(); tessellator.end(); } I have already tried to reverse the position of the vertex. GUI of the block / icons to display :
  4. yes it is the same modid but not the same registry name. The thing I want to do is to replace all occurrences of the block in the world. I tried to do it using the WorldEvent.Load function but I am not sure I can redefine all block especially the ones that are far away from the spawning position. (edit start) I can do it using ChunkEvent.Load but I am not sure of whether this event is reached when loading the world.(edit stop) The solution of replacing the block does not satisfy me as it keeps the bad block in the delivered mods jar file.
  5. hello everyone, I have done a mod in version 1.14 and 1.15 and I am actually updating it to version 1.16.5. But in this process I want to replace some block in it. How can I replace block before loading the world (after clicking on play button on the main menu screen). My block are some simple switchrail (see picture below) that have only two states : the axis of the straight line and the switch position of the block (straight or turn). After this modification, there must be three property : facing, hinge( if the switch turn is on right or left ), switch position.
  6. Hello everyone, I am making a mod that place specific sign in Minecraft. I decided to make a first gui that allow the user to select a specific form of sign (see fig 1). Then I create a second screen for the sign with a little white arrow (located on the right in the middle). However, when placing one of this and retrying to create the same sign it did initialise the screen (of fig 2) but is unable to render it. I will add as detail that the screen is rendered using a loop of networking call : first the user click on the block which send to the server a message to open the GUI. Then when on the first GUI if we click on the specific button, it send to server a message to open the second GUI. Here is the link to my git repository : https://github.com/matt1999rd/SignMod. To place this sign it is mandatory to place support and grid connecting support) and click on grid. (2 by 3 grid mandatory) fig 1 : first screen always displayed fig 2 : second screen that can be initialised without being rendered
  7. it was not working because of the model json that was not placed. But now it works well thank you
  8. what do you mean by pre-computed ? is a tab with model for each possibilities created when using multipart ? for my mod I deleted the attributes. Another strange bug happened with lag in loading in minecraft : when I add .doesnotblockmovement to my blocks it is loading really slowly.
  9. Hello everyone, I am doing a mod involving a panel block class. This block has multiple blockstateproperties : @Override protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { builder.add( BlockStateProperties.HORIZONTAL_FACING, GridSupport.ROTATED, GRID, NORTH_EAST, NORTH_WEST, SOUTH_EAST, SOUTH_WEST, BlockStateProperties.NORTH, BlockStateProperties.SOUTH, BlockStateProperties.WEST, BlockStateProperties.EAST ); } I decided to add a new properties scale that do not change rendering of block. this property is a integer property that allow 4 values : 0,1,2,3 each for modifying pixel length when modifying panel image. Before doing it, minecraft was launching normally but after that it is not working at all and minecraft stop launching after this line : [18:43:11] [Client thread/INFO] [minecraft/AtlasTexture]: Created: 512x512 textures-atlas I don't know if there is any reason why it is suddenly lagging. Here is the commit of my code before adding scale with all others features implying it : https://github.com/matt1999rd/SignMod
  10. I solve this issues myself and I forget the alpha layer. However I really wander what Tesselator use and how I can use it in TER or gui ?
  11. Hello everyone, I am a total beginner in display code and I want in my new mode to fill a square of a screen with a color that is saved in my screen field. I try to use AbstractGui#fill but it seems not to work. I have seen many time the instance Tesselator that was used but I don't see what this do and how I should use it. In the same idea openGL is used backward and I would like to know where I can find tutorial to understand basic functionnalities of this software. Here is the Screen I want to implement it looks alike the one in ichttt mod because I want to implement something of this kind with more options : https://github.com/matt1999rd/SignMod/blob/master/src/main/java/fr/mattmouss/signs/gui/DrawingScreen.java
  12. ok right but I don't know how to manage it and in fact it does not look right because when I place my block it replace the support by air instead of PanelBlock I don't understand why. I have done this both server and client side to avoid side problem and still the problem occurs. You can see here the code of my Registration : https://github.com/matt1999rd/SignMod/blob/master/src/main/java/fr/mattmouss/signs/fixedpanel/PanelRegister.java I put the block in the Packet send to server : https://github.com/matt1999rd/SignMod/blob/master/src/main/java/fr/mattmouss/signs/networking/PacketPlacePanel.java
  13. Hello everyone, in my new mod I am trying the TER implementation and I have started an empty TE with a TER and run it to see if anythings happened but it looks like nothing is done. Here is the links to all my staff : https://github.com/matt1999rd/SignMod/tree/master/src/main/java/fr/mattmouss/signs/tileentity I register this TER into the proxy as you can see here : https://github.com/matt1999rd/SignMod/tree/master/src/main/java/fr/mattmouss/signs/setup I don't know what I need to add to make sure it render even incorrectly
  14. I am returning to this topic because I am about to upload my mod and the function does not work for 1.14.4 unfortunately do someone have an idea of how to do it ?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.