User Tools

Site Tools


tutorial:screenhandler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:screenhandler [2022/12/03 13:52] – corrected my previous edit ayutactutorial:screenhandler [2022/12/17 15:37] – registry -> registries miir
Line 144: Line 144:
  
     static {     static {
-        BOX_BLOCK = Registry.register(Registry.BLOCK, BOX, new BoxBlock(FabricBlockSettings.copyOf(Blocks.CHEST))); +        BOX_BLOCK = Registry.register(Registries.BLOCK, BOX, new BoxBlock(FabricBlockSettings.copyOf(Blocks.CHEST))); 
-        BOX_BLOCK_ITEM = Registry.register(Registry.ITEM, BOX, new BlockItem(BOX_BLOCK, new Item.Settings().group(ItemGroup.MISC)));+        BOX_BLOCK_ITEM = Registry.register(Registries.ITEM, BOX, new BlockItem(BOX_BLOCK, new Item.Settings().group(ItemGroup.MISC)));
  
         //The parameter of build at the very end is always null, do not worry about it         //The parameter of build at the very end is always null, do not worry about it
Line 255: Line 255:
     @Override     @Override
     protected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY) {     protected void drawBackground(MatrixStack matrices, float delta, int mouseX, int mouseY) {
-        RenderSystem.setShader(GameRenderer::getPositionTexShader);+        RenderSystem.setShader(GameRenderer::getPositionTexProgram);
         RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);         RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
         RenderSystem.setShaderTexture(0, TEXTURE);         RenderSystem.setShaderTexture(0, TEXTURE);
tutorial/screenhandler.txt · Last modified: 2024/02/19 02:51 by netuserget