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 [2020/02/22 02:15] – Mappings + minor fixes earthcomputertutorial:fluids [2020/10/09 23:14] – Update names, fix compile issues 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;
tutorial/fluids.txt · Last modified: 2023/05/04 11:31 by solidblock