User Tools

Site Tools


tutorial:fluids

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:fluids [2019/09/24 15:02] – code style alexiytutorial:fluids [2019/09/24 15:17] – more code style alexiy
Line 259: Line 259:
     public Item getBucketItem()     public Item getBucketItem()
     {     {
-        return [ModInitializer].acidBucket;+        return Mod.acidBucket;
     }     }
          
Line 266: Line 266:
     {     {
         //don't ask me what **method_15741** does...         //don't ask me what **method_15741** does...
-        return [ModInitializer].acid.getDefaultState().with(FluidBlock.LEVEL, method_15741(fluidState));+        return Mod.acid.getDefaultState().with(FluidBlock.LEVEL, method_15741(fluidState));
     }     }
  
Line 272: Line 272:
     public Fluid getFlowing()     public Fluid getFlowing()
     {     {
-        return [ModInitializer].flowingAcid;+        return Mod.flowingAcid;
     }     }
  
Line 278: Line 278:
     public Fluid getStill()     public Fluid getStill()
     {     {
-        return [ModInitializer].stillAcid;+        return Mod.stillAcid;
     }     }
  
Line 284: Line 284:
     public boolean matchesType(Fluid fluid_1)     public boolean matchesType(Fluid fluid_1)
     {     {
-        return fluid_1==[ModInitializer].flowingAcid || fluid_1==[ModInitializer].stillAcid;+        return fluid_1==Mod.flowingAcid || fluid_1==Mod.stillAcid;
     }     }
          
Line 322: Line 322:
             public Sprite[] getFluidSprites(ExtendedBlockView extendedBlockView, BlockPos blockPos, FluidState fluidState)             public Sprite[] getFluidSprites(ExtendedBlockView extendedBlockView, BlockPos blockPos, FluidState fluidState)
             {             {
-                return new Sprite[]{stillAcidSprite, dynamicAcidSprite};+                return new Sprite[] {stillAcidSprite, dynamicAcidSprite};
             }             }
  
Line 335: Line 335:
         // registering the same renderer for both fluid variants is intentional         // registering the same renderer for both fluid variants is intentional
  
-        FluidRenderHandlerRegistry.INSTANCE.register([ModInitializer].stillAcid, acidRenderHandler); +        FluidRenderHandlerRegistry.INSTANCE.register(Mod.stillAcid, acidRenderHandler); 
-        FluidRenderHandlerRegistry.INSTANCE.register([ModInitializer].flowingAcid, acidRenderHandler);+        FluidRenderHandlerRegistry.INSTANCE.register(Mod.flowingAcid, acidRenderHandler);
 </code> </code>
  
tutorial/fluids.txt · Last modified: 2023/05/04 11:31 by solidblock