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 revision
Previous revision
Next revisionBoth sides next revision
tutorial:fluids [2020/02/22 02:15] – Mappings + minor fixes earthcomputertutorial:fluids [2020/10/10 02:57] – More mappings fixes comp500
Line 5: Line 5:
  
 ===== Making an abstract fluid ===== ===== Making an abstract fluid =====
-Vanilla fluids extend ''net.minecraft.fluid.BaseFluid'', and so shall we.+Vanilla fluids extend ''net.minecraft.fluid.FlowableFluid'', and so shall we.
 <code java [enable_line_numbers="true"]> <code java [enable_line_numbers="true"]>
-public abstract class TutorialFluid extends BaseFluid+public abstract class TutorialFluid extends FlowableFluid
 { {
  /**  /**
Line 32: Line 32:
  */  */
  @Override  @Override
- protected void beforeBreakingBlock(IWorld world, BlockPos pos, BlockState state)+ protected void beforeBreakingBlock(WorldAccess world, BlockPos pos, BlockState state)
  {  {
  final BlockEntity blockEntity = state.getBlock().hasBlockEntity() ? world.getBlockEntity(pos) : null;  final BlockEntity blockEntity = state.getBlock().hasBlockEntity() ? world.getBlockEntity(pos) : null;
- Block.dropStacks(state, world.getWorld(), pos, blockEntity);+ Block.dropStacks(state, world, pos, blockEntity);
  }  }
   
Line 55: Line 55:
  */  */
  @Override  @Override
- protected int method_15733(WorldView worldView)+ protected int getFlowSpeed(WorldView worldView)
  {  {
  return 4;  return 4;
Line 164: Line 164:
 // ... // ...
  
-public static BaseFluid STILL_ACID; +public static FlowableFluid STILL_ACID; 
-public static BaseFluid FLOWING_ACID;+public static FlowableFluid FLOWING_ACID;
  
 public static Item ACID_BUCKET; public static Item ACID_BUCKET;
tutorial/fluids.txt · Last modified: 2023/05/04 11:31 by solidblock