Jump to content

[1.17.1] Problem With Custom Fluid


furiusmax55

Recommended Posts

		public static final RegistryObject<CustomLiquidBlock> PURIFIEDWATERBLOCK = BLOCKS	
		           .register("purified_water", () -> new CustomLiquidBlock(ModFluids.PURIFIEDWATER, 			  BlockBehaviour.Properties.of(Material.WATER).noCollission().strength(100.0F).noDrops()));
Spoiler
public class CustomLiquidBlock extends LiquidBlock{
	   public static final IntegerProperty LEVEL = BlockStateProperties.LEVEL;
	   protected final FlowingFluid fluid;
	   private final List<FluidState> stateCache;
	   public static final VoxelShape STABLE_SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D);
	   public static final ImmutableList<Direction> POSSIBLE_FLOW_DIRECTIONS = ImmutableList.of(Direction.DOWN, Direction.SOUTH, Direction.NORTH, Direction.EAST, Direction.WEST);

	   @Deprecated  // Forge: Use the constructor that takes a supplier
	   public CustomLiquidBlock(FlowingFluid p_54694_, BlockBehaviour.Properties p_54695_) {
	      super(p_54694_, p_54695_);
	      this.fluid = p_54694_;
	      this.stateCache = Lists.newArrayList();
	      this.stateCache.add(p_54694_.getSource(false));

	      for(int i = 1; i < 8; ++i) {
	         this.stateCache.add(p_54694_.getFlowing(8 - i, false));
	      }

	      this.stateCache.add(p_54694_.getFlowing(8, true));
	      this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, Integer.valueOf(0)));
	      fluidStateCacheInitialized = true;
	      supplier = p_54694_.delegate;
	   }

	   /**
	    * @param supplier A fluid supplier such as {@link net.minecraftforge.fmllegacy.RegistryObject<Fluid>}
	    */
	   public CustomLiquidBlock(java.util.function.Supplier<? extends FlowingFluid> p_54694_, BlockBehaviour.Properties p_54695_) {
	      super(p_54694_, p_54695_);
	      this.fluid = null;
	      this.stateCache = Lists.newArrayList();
	      this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, Integer.valueOf(0)));
	      this.supplier = p_54694_;
	   }
       @Override
	   public VoxelShape getCollisionShape(BlockState p_54760_, BlockGetter p_54761_, BlockPos p_54762_, CollisionContext p_54763_) {
	      return p_54763_.isAbove(STABLE_SHAPE, p_54762_, true) && p_54760_.getValue(LEVEL) == 0 && p_54763_.canStandOnFluid(p_54761_.getFluidState(p_54762_.above()), getFluid()) ? STABLE_SHAPE : Shapes.empty();
	   }
       @Override
	   public boolean isRandomlyTicking(BlockState p_54732_) {
	      return p_54732_.getFluidState().isRandomlyTicking();
	   }
       @Override
	   public void randomTick(BlockState p_54740_, ServerLevel p_54741_, BlockPos p_54742_, Random p_54743_) {
	      p_54740_.getFluidState().randomTick(p_54741_, p_54742_, p_54743_);
	   }
       @Override
	   public boolean propagatesSkylightDown(BlockState p_54745_, BlockGetter p_54746_, BlockPos p_54747_) {
	      return false;
	   }
       @Override
	   public boolean isPathfindable(BlockState p_54704_, BlockGetter p_54705_, BlockPos p_54706_, PathComputationType p_54707_) {
	      return !getFluid().is(FluidTags.LAVA);
	   }
       @Override
	   public FluidState getFluidState(BlockState p_54765_) {
	      int i = p_54765_.getValue(LEVEL);
	      if (!fluidStateCacheInitialized) initFluidStateCache();
	      return this.stateCache.get(Math.min(i, 8));
	   }
       @Override
	   public boolean skipRendering(BlockState p_54716_, BlockState p_54717_, Direction p_54718_) {
	      return p_54717_.getFluidState().getType().isSame(getFluid());
	   }
       @Override
	   public RenderShape getRenderShape(BlockState p_54738_) {
	      return RenderShape.INVISIBLE;
	   }
       @Override
	   public List<ItemStack> getDrops(BlockState p_54720_, LootContext.Builder p_54721_) {
	      return Collections.emptyList();
	   }
       @Override
	   public VoxelShape getShape(BlockState p_54749_, BlockGetter p_54750_, BlockPos p_54751_, CollisionContext p_54752_) {
	      return Shapes.empty();
	   }
       @Override
	   public void onPlace(BlockState p_54754_, Level p_54755_, BlockPos p_54756_, BlockState p_54757_, boolean p_54758_) {
	      if (this.shouldSpreadLiquid(p_54755_, p_54756_, p_54754_)) {
	         p_54755_.getLiquidTicks().scheduleTick(p_54756_, p_54754_.getFluidState().getType(), getFluid().getTickDelay(p_54755_));
	      }

	   }
       @Override
	   public BlockState updateShape(BlockState p_54723_, Direction p_54724_, BlockState p_54725_, LevelAccessor p_54726_, BlockPos p_54727_, BlockPos p_54728_) {
	      if (p_54723_.getFluidState().isSource() || p_54725_.getFluidState().isSource()) {
	         p_54726_.getLiquidTicks().scheduleTick(p_54727_, p_54723_.getFluidState().getType(), getFluid().getTickDelay(p_54726_));
	      }

	      return null;
	   }
       @Override
	   public void neighborChanged(BlockState p_54709_, Level p_54710_, BlockPos p_54711_, Block p_54712_, BlockPos p_54713_, boolean p_54714_) {
	      if (this.shouldSpreadLiquid(p_54710_, p_54711_, p_54709_)) {
	         p_54710_.getLiquidTicks().scheduleTick(p_54711_, p_54709_.getFluidState().getType(), getFluid().getTickDelay(p_54710_));
	      }

	   }
       
	   private boolean shouldSpreadLiquid(Level p_54697_, BlockPos p_54698_, BlockState p_54699_) {
	      if (getFluid().is(FluidTags.LAVA)) {
	         boolean flag = p_54697_.getBlockState(p_54698_.below()).is(Blocks.SOUL_SOIL);

	         for(Direction direction : POSSIBLE_FLOW_DIRECTIONS) {
	            BlockPos blockpos = p_54698_.relative(direction.getOpposite());
	            if (p_54697_.getFluidState(blockpos).is(FluidTags.WATER)) {
	               Block block = p_54697_.getFluidState(p_54698_).isSource() ? Blocks.OBSIDIAN : Blocks.COBBLESTONE;
	               p_54697_.setBlockAndUpdate(p_54698_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_54697_, p_54698_, p_54698_, block.defaultBlockState()));
	               this.fizz(p_54697_, p_54698_);
	               return false;
	            }

	            if (flag && p_54697_.getBlockState(blockpos).is(Blocks.BLUE_ICE)) {
	               p_54697_.setBlockAndUpdate(p_54698_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_54697_, p_54698_, p_54698_, Blocks.BASALT.defaultBlockState()));
	               this.fizz(p_54697_, p_54698_);
	               return false;
	            }
	         }
	      }

	      return true;
	   }

	   private void fizz(LevelAccessor p_54701_, BlockPos p_54702_) {
	      p_54701_.levelEvent(1501, p_54702_, 0);
	   }
       @Override
	   protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_54730_) {
	      p_54730_.add(LEVEL);
	   }
       @Override
	   public ItemStack pickupBlock(LevelAccessor p_153772_, BlockPos p_153773_, BlockState p_153774_) {
	      if (p_153774_.getValue(LEVEL) == 0) {
	         p_153772_.setBlock(p_153773_, Blocks.AIR.defaultBlockState(), 11);
	         return new ItemStack(getFluid().getBucket());
	      } else {
	         return ItemStack.EMPTY;
	      }
	   }

	   // Forge start
	   private final java.util.function.Supplier<? extends net.minecraft.world.level.material.Fluid> supplier;
	   @Override
	   public FlowingFluid getFluid() {
	      return (FlowingFluid)supplier.get();
	   }

	   private boolean fluidStateCacheInitialized = false;
	   @Override
	   protected synchronized void initFluidStateCache() {
	      if (fluidStateCacheInitialized == false) {
	         this.stateCache.add(getFluid().getSource(false));

	         for (int i = 1; i < 8; ++i)
	            this.stateCache.add(getFluid().getFlowing(8 - i, false));

	         this.stateCache.add(getFluid().getFlowing(8, true));
	         fluidStateCacheInitialized = true;
	      }
	   }
	   @Override
	   public Optional<SoundEvent> getPickupSound() {
	      return getFluid().getPickupSound();
	   }
}

 

	    public static final RegistryObject<FlowingFluid> PURIFIEDWATER = FLUIDS
	            .register("purified_water",
	                    () -> new FluidPurifiedWater.Source(FluidPurifiedWater.PURIFIED_WATER_PROPS));
	    public static final RegistryObject<FlowingFluid> PURIFIEDWATER_FLOW = FLUIDS
	            .register("purified_water_flow",
	                    () -> new FluidPurifiedWater.Flowing(FluidPurifiedWater.PURIFIED_WATER_PROPS));
Spoiler
public abstract class FluidPurifiedWater extends ForgeFlowingFluid{
	
	
   public static final ForgeFlowingFluid.Properties PURIFIED_WATER_PROPS =
            new ForgeFlowingFluid.Properties(
            		ModFluids.PURIFIEDWATER, ModFluids.PURIFIEDWATER_FLOW, FluidAttributes
                    .builder(new ResourceLocation(ArkaneMagicka.MOD_ID, "block/purified_water_still"),
                            new ResourceLocation(ArkaneMagicka.MOD_ID, "block/purified_water_flow"))
                    .color(0x3DDCFF).density(4).viscosity(1).rarity(Rarity.EPIC))
                    .bucket(ModItems.PURIFIEDWATER_BUCKET)
                    .block(ModBlocks.PURIFIEDWATERBLOCK);

    protected FluidPurifiedWater(Properties properties) {
        super(properties);
    }
    

    public static class Flowing extends FluidPurifiedWater {
    	
        protected Flowing(Properties properties) {
			super(properties);
            registerDefaultState(getStateDefinition().any().setValue(LEVEL, 7));

		}
        @Override
		protected void createFluidStateDefinition(StateDefinition.Builder<Fluid, FluidState> p_76476_) {
            super.createFluidStateDefinition(p_76476_);
            p_76476_.add(LEVEL);
         }
        @Override
         public int getAmount(FluidState p_76480_) {
            return p_76480_.getValue(LEVEL);
         }
        @Override
         public boolean isSource(FluidState p_76478_) {
            return false;
         }

    }
    public static class Source extends FluidPurifiedWater {

        public Source(Properties properties) {
            super(properties);
        }
        @Override
        public int getAmount(FluidState p_76485_) {
            return 8;
         }
        @Override
         public boolean isSource(FluidState p_76483_) {
            return true;
         }
    }
}

 

crash log 
 

Spoiler
---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.

Time: 15/9/21 12:05
Description: Exception while ticking

java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.block.state.BlockState.isAir()" because "p_49910_" is null
	at net.minecraft.world.level.block.Block.updateOrDestroy(Block.java:158) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.updateNeighbourShapes(BlockBehaviour.java:611) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.Level.markAndNotifyBlock(Level.java:246) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:213) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:177) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.material.FlowingFluid.spreadTo(FlowingFluid.java:244) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.spreadToSides(FlowingFluid.java:146) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.spread(FlowingFluid.java:125) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.tick(FlowingFluid.java:410) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FluidState.tick(FluidState.java:73) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.server.level.ServerLevel.tickLiquid(ServerLevel.java:602) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.ServerTickList.tick(ServerTickList.java:78) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:341) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:882) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:818) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:85) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:683) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at java.lang.Thread.run(Thread.java:831) [?:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Server thread
Stacktrace:
	at net.minecraft.world.level.block.Block.updateOrDestroy(Block.java:158) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.updateNeighbourShapes(BlockBehaviour.java:611) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.Level.markAndNotifyBlock(Level.java:246) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:213) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:177) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.material.FlowingFluid.spreadTo(FlowingFluid.java:244) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.spreadToSides(FlowingFluid.java:146) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.spread(FlowingFluid.java:125) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.tick(FlowingFluid.java:410) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FluidState.tick(FluidState.java:73) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.server.level.ServerLevel.tickLiquid(ServerLevel.java:602) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
-- Block being ticked --
Details:
	Block location: World: (-48,4,63), Section: (at 0,4,15 in -3,0,3; chunk contains blocks -48,0,48 to -33,255,63), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Stacktrace:
	at net.minecraft.world.level.ServerTickList.tick(ServerTickList.java:78) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:341) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}


-- Affected level --
Details:
	All players: 1 total; [ServerPlayer['Dev'/99, l='ServerLevel[New World]', x=-48.50, y=4.00, z=61.50]]
	Chunk stats: 2209
	Level dimension: minecraft:overworld
	Level spawn location: World: (-48,4,64), Section: (at 0,4,0 in -3,0,4; chunk contains blocks -48,0,64 to -33,255,79), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
	Level time: 241 game time, 241 day time
	Level name: New World
	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
	Level weather: Rain time: 27970 (now: false), thunder time: 15855 (now: false)
	Known server brands: forge
	Level was modded: true
	Level storage version: 0x04ABD - Anvil
Stacktrace:
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:882) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:818) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:85) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:683) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at java.lang.Thread.run(Thread.java:831) [?:?] {}


-- System Details --
Details:
	Minecraft Version: 1.17.1
	Minecraft Version ID: 1.17.1
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 16.0.1, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
	Memory: 1174793640 bytes (1120 MiB) / 1895825408 bytes (1808 MiB) up to 4276092928 bytes (4078 MiB)
	CPUs: 16
	Processor Vendor: AuthenticAMD
	Processor Name: AMD Ryzen 7 2700X Eight-Core Processor         
	Identifier: AuthenticAMD Family 23 Model 8 Stepping 2
	Microarchitecture: Zen+
	Frequency (GHz): 3,69
	Number of physical packages: 1
	Number of physical CPUs: 8
	Number of logical CPUs: 16
	Graphics card #0 name: NVIDIA GeForce GTX 1050 Ti
	Graphics card #0 vendor: NVIDIA (0x10de)
	Graphics card #0 VRAM (MB): 4095,00
	Graphics card #0 deviceId: 0x1c82
	Graphics card #0 versionInfo: DriverVersion=27.21.14.5671
	Memory slot #0 capacity (MB): 8192,00
	Memory slot #0 clockSpeed (GHz): 2,67
	Memory slot #0 type: DDR4
	Memory slot #1 capacity (MB): 8192,00
	Memory slot #1 clockSpeed (GHz): 2,67
	Memory slot #1 type: DDR4
	Virtual memory max (MB): 20912,76
	Virtual memory used (MB): 12187,51
	Swap memory total (MB): 4608,00
	Swap memory used (MB): 5,98
	JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -XX:+ShowCodeDetailsInExceptionMessages
	Player Count: 1 / 8; [ServerPlayer['Dev'/99, l='ServerLevel[New World]', x=-48.50, y=4.00, z=61.50]]
	Data Packs: vanilla, mod:arkanemagicka (incompatible), mod:forge
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'forge'
	ModLauncher: 9.0.7+91+master.8569cdf
	ModLauncher launch target: forgeclientuserdev
	ModLauncher naming: mcp
	ModLauncher services: 
		 eventbus PLUGINSERVICE 
		 object_holder_definalize PLUGINSERVICE 
		 runtime_enum_extender PLUGINSERVICE 
		 capability_inject_definalize PLUGINSERVICE 
		 accesstransformer PLUGINSERVICE 
		 runtimedistcleaner PLUGINSERVICE 
		 fml TRANSFORMATIONSERVICE 
	FML Language Providers: 
		minecraft@1.0
		javafml@null
	Mod List: 
		forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp|Minecraft                     |minecraft                     |1.17.1              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
		main                                              |Arkane Magicka                |arkanemagicka                 |0.0NONE             |DONE      |Manifest: NOSIGNATURE
		                                                  |Forge                         |forge                         |37.0.53             |DONE      |Manifest: NOSIGNATURE
	Crash Report UUID: affe95c1-583d-48a6-bdec-2b4868fdeb6a
	FML: 37.0
	Forge: net.minecraftforge:37.0.53

 

When I put the fluid with its bucket the game crashes giving that error.

The LiquidBlock class constructor is broken and I had to create CustomLiquidBlock to fix it by changing this.fluid to getFluid().

Thanks in advance.

Edited by furiusmax55
Link to comment
Share on other sites

  • furiusmax55 changed the title to [1.17.1] Problem With Custom Fluid
1 minute ago, diesieben07 said:

CustomLiquidBlock is not shown.

Spoiler
public class CustomLiquidBlock extends LiquidBlock{
	   public static final IntegerProperty LEVEL = BlockStateProperties.LEVEL;
	   protected final FlowingFluid fluid;
	   private final List<FluidState> stateCache;
	   public static final VoxelShape STABLE_SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D);
	   public static final ImmutableList<Direction> POSSIBLE_FLOW_DIRECTIONS = ImmutableList.of(Direction.DOWN, Direction.SOUTH, Direction.NORTH, Direction.EAST, Direction.WEST);

	   @Deprecated  // Forge: Use the constructor that takes a supplier
	   public CustomLiquidBlock(FlowingFluid p_54694_, BlockBehaviour.Properties p_54695_) {
	      super(p_54694_, p_54695_);
	      this.fluid = p_54694_;
	      this.stateCache = Lists.newArrayList();
	      this.stateCache.add(p_54694_.getSource(false));

	      for(int i = 1; i < 8; ++i) {
	         this.stateCache.add(p_54694_.getFlowing(8 - i, false));
	      }

	      this.stateCache.add(p_54694_.getFlowing(8, true));
	      this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, Integer.valueOf(0)));
	      fluidStateCacheInitialized = true;
	      supplier = p_54694_.delegate;
	   }

	   /**
	    * @param supplier A fluid supplier such as {@link net.minecraftforge.fmllegacy.RegistryObject<Fluid>}
	    */
	   public CustomLiquidBlock(java.util.function.Supplier<? extends FlowingFluid> p_54694_, BlockBehaviour.Properties p_54695_) {
	      super(p_54694_, p_54695_);
	      this.fluid = null;
	      this.stateCache = Lists.newArrayList();
	      this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, Integer.valueOf(0)));
	      this.supplier = p_54694_;
	   }
       @Override
	   public VoxelShape getCollisionShape(BlockState p_54760_, BlockGetter p_54761_, BlockPos p_54762_, CollisionContext p_54763_) {
	      return p_54763_.isAbove(STABLE_SHAPE, p_54762_, true) && p_54760_.getValue(LEVEL) == 0 && p_54763_.canStandOnFluid(p_54761_.getFluidState(p_54762_.above()), getFluid()) ? STABLE_SHAPE : Shapes.empty();
	   }
       @Override
	   public boolean isRandomlyTicking(BlockState p_54732_) {
	      return p_54732_.getFluidState().isRandomlyTicking();
	   }
       @Override
	   public void randomTick(BlockState p_54740_, ServerLevel p_54741_, BlockPos p_54742_, Random p_54743_) {
	      p_54740_.getFluidState().randomTick(p_54741_, p_54742_, p_54743_);
	   }
       @Override
	   public boolean propagatesSkylightDown(BlockState p_54745_, BlockGetter p_54746_, BlockPos p_54747_) {
	      return false;
	   }
       @Override
	   public boolean isPathfindable(BlockState p_54704_, BlockGetter p_54705_, BlockPos p_54706_, PathComputationType p_54707_) {
	      return !getFluid().is(FluidTags.LAVA);
	   }
       @Override
	   public FluidState getFluidState(BlockState p_54765_) {
	      int i = p_54765_.getValue(LEVEL);
	      if (!fluidStateCacheInitialized) initFluidStateCache();
	      return this.stateCache.get(Math.min(i, 8));
	   }
       @Override
	   public boolean skipRendering(BlockState p_54716_, BlockState p_54717_, Direction p_54718_) {
	      return p_54717_.getFluidState().getType().isSame(getFluid());
	   }
       @Override
	   public RenderShape getRenderShape(BlockState p_54738_) {
	      return RenderShape.INVISIBLE;
	   }
       @Override
	   public List<ItemStack> getDrops(BlockState p_54720_, LootContext.Builder p_54721_) {
	      return Collections.emptyList();
	   }
       @Override
	   public VoxelShape getShape(BlockState p_54749_, BlockGetter p_54750_, BlockPos p_54751_, CollisionContext p_54752_) {
	      return Shapes.empty();
	   }
       @Override
	   public void onPlace(BlockState p_54754_, Level p_54755_, BlockPos p_54756_, BlockState p_54757_, boolean p_54758_) {
	      if (this.shouldSpreadLiquid(p_54755_, p_54756_, p_54754_)) {
	         p_54755_.getLiquidTicks().scheduleTick(p_54756_, p_54754_.getFluidState().getType(), getFluid().getTickDelay(p_54755_));
	      }

	   }
       @Override
	   public BlockState updateShape(BlockState p_54723_, Direction p_54724_, BlockState p_54725_, LevelAccessor p_54726_, BlockPos p_54727_, BlockPos p_54728_) {
	      if (p_54723_.getFluidState().isSource() || p_54725_.getFluidState().isSource()) {
	         p_54726_.getLiquidTicks().scheduleTick(p_54727_, p_54723_.getFluidState().getType(), getFluid().getTickDelay(p_54726_));
	      }

	      return null;
	   }
       @Override
	   public void neighborChanged(BlockState p_54709_, Level p_54710_, BlockPos p_54711_, Block p_54712_, BlockPos p_54713_, boolean p_54714_) {
	      if (this.shouldSpreadLiquid(p_54710_, p_54711_, p_54709_)) {
	         p_54710_.getLiquidTicks().scheduleTick(p_54711_, p_54709_.getFluidState().getType(), getFluid().getTickDelay(p_54710_));
	      }

	   }
       
	   private boolean shouldSpreadLiquid(Level p_54697_, BlockPos p_54698_, BlockState p_54699_) {
	      if (getFluid().is(FluidTags.LAVA)) {
	         boolean flag = p_54697_.getBlockState(p_54698_.below()).is(Blocks.SOUL_SOIL);

	         for(Direction direction : POSSIBLE_FLOW_DIRECTIONS) {
	            BlockPos blockpos = p_54698_.relative(direction.getOpposite());
	            if (p_54697_.getFluidState(blockpos).is(FluidTags.WATER)) {
	               Block block = p_54697_.getFluidState(p_54698_).isSource() ? Blocks.OBSIDIAN : Blocks.COBBLESTONE;
	               p_54697_.setBlockAndUpdate(p_54698_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_54697_, p_54698_, p_54698_, block.defaultBlockState()));
	               this.fizz(p_54697_, p_54698_);
	               return false;
	            }

	            if (flag && p_54697_.getBlockState(blockpos).is(Blocks.BLUE_ICE)) {
	               p_54697_.setBlockAndUpdate(p_54698_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_54697_, p_54698_, p_54698_, Blocks.BASALT.defaultBlockState()));
	               this.fizz(p_54697_, p_54698_);
	               return false;
	            }
	         }
	      }

	      return true;
	   }

	   private void fizz(LevelAccessor p_54701_, BlockPos p_54702_) {
	      p_54701_.levelEvent(1501, p_54702_, 0);
	   }
       @Override
	   protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_54730_) {
	      p_54730_.add(LEVEL);
	   }
       @Override
	   public ItemStack pickupBlock(LevelAccessor p_153772_, BlockPos p_153773_, BlockState p_153774_) {
	      if (p_153774_.getValue(LEVEL) == 0) {
	         p_153772_.setBlock(p_153773_, Blocks.AIR.defaultBlockState(), 11);
	         return new ItemStack(getFluid().getBucket());
	      } else {
	         return ItemStack.EMPTY;
	      }
	   }

	   // Forge start
	   private final java.util.function.Supplier<? extends net.minecraft.world.level.material.Fluid> supplier;
	   @Override
	   public FlowingFluid getFluid() {
	      return (FlowingFluid)supplier.get();
	   }

	   private boolean fluidStateCacheInitialized = false;
	   @Override
	   protected synchronized void initFluidStateCache() {
	      if (fluidStateCacheInitialized == false) {
	         this.stateCache.add(getFluid().getSource(false));

	         for (int i = 1; i < 8; ++i)
	            this.stateCache.add(getFluid().getFlowing(8 - i, false));

	         this.stateCache.add(getFluid().getFlowing(8, true));
	         fluidStateCacheInitialized = true;
	      }
	   }
	   @Override
	   public Optional<SoundEvent> getPickupSound() {
	      return getFluid().getPickupSound();
	   }
}

 

 

Link to comment
Share on other sites

8 minutes ago, furiusmax55 said:
  Reveal hidden contents
public class CustomLiquidBlock extends LiquidBlock{
	   public static final IntegerProperty LEVEL = BlockStateProperties.LEVEL;
	   protected final FlowingFluid fluid;
	   private final List<FluidState> stateCache;
	   public static final VoxelShape STABLE_SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 8.0D, 16.0D);
	   public static final ImmutableList<Direction> POSSIBLE_FLOW_DIRECTIONS = ImmutableList.of(Direction.DOWN, Direction.SOUTH, Direction.NORTH, Direction.EAST, Direction.WEST);

	   @Deprecated  // Forge: Use the constructor that takes a supplier
	   public CustomLiquidBlock(FlowingFluid p_54694_, BlockBehaviour.Properties p_54695_) {
	      super(p_54694_, p_54695_);
	      this.fluid = p_54694_;
	      this.stateCache = Lists.newArrayList();
	      this.stateCache.add(p_54694_.getSource(false));

	      for(int i = 1; i < 8; ++i) {
	         this.stateCache.add(p_54694_.getFlowing(8 - i, false));
	      }

	      this.stateCache.add(p_54694_.getFlowing(8, true));
	      this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, Integer.valueOf(0)));
	      fluidStateCacheInitialized = true;
	      supplier = p_54694_.delegate;
	   }

	   /**
	    * @param supplier A fluid supplier such as {@link net.minecraftforge.fmllegacy.RegistryObject<Fluid>}
	    */
	   public CustomLiquidBlock(java.util.function.Supplier<? extends FlowingFluid> p_54694_, BlockBehaviour.Properties p_54695_) {
	      super(p_54694_, p_54695_);
	      this.fluid = null;
	      this.stateCache = Lists.newArrayList();
	      this.registerDefaultState(this.stateDefinition.any().setValue(LEVEL, Integer.valueOf(0)));
	      this.supplier = p_54694_;
	   }
       @Override
	   public VoxelShape getCollisionShape(BlockState p_54760_, BlockGetter p_54761_, BlockPos p_54762_, CollisionContext p_54763_) {
	      return p_54763_.isAbove(STABLE_SHAPE, p_54762_, true) && p_54760_.getValue(LEVEL) == 0 && p_54763_.canStandOnFluid(p_54761_.getFluidState(p_54762_.above()), getFluid()) ? STABLE_SHAPE : Shapes.empty();
	   }
       @Override
	   public boolean isRandomlyTicking(BlockState p_54732_) {
	      return p_54732_.getFluidState().isRandomlyTicking();
	   }
       @Override
	   public void randomTick(BlockState p_54740_, ServerLevel p_54741_, BlockPos p_54742_, Random p_54743_) {
	      p_54740_.getFluidState().randomTick(p_54741_, p_54742_, p_54743_);
	   }
       @Override
	   public boolean propagatesSkylightDown(BlockState p_54745_, BlockGetter p_54746_, BlockPos p_54747_) {
	      return false;
	   }
       @Override
	   public boolean isPathfindable(BlockState p_54704_, BlockGetter p_54705_, BlockPos p_54706_, PathComputationType p_54707_) {
	      return !getFluid().is(FluidTags.LAVA);
	   }
       @Override
	   public FluidState getFluidState(BlockState p_54765_) {
	      int i = p_54765_.getValue(LEVEL);
	      if (!fluidStateCacheInitialized) initFluidStateCache();
	      return this.stateCache.get(Math.min(i, 8));
	   }
       @Override
	   public boolean skipRendering(BlockState p_54716_, BlockState p_54717_, Direction p_54718_) {
	      return p_54717_.getFluidState().getType().isSame(getFluid());
	   }
       @Override
	   public RenderShape getRenderShape(BlockState p_54738_) {
	      return RenderShape.INVISIBLE;
	   }
       @Override
	   public List<ItemStack> getDrops(BlockState p_54720_, LootContext.Builder p_54721_) {
	      return Collections.emptyList();
	   }
       @Override
	   public VoxelShape getShape(BlockState p_54749_, BlockGetter p_54750_, BlockPos p_54751_, CollisionContext p_54752_) {
	      return Shapes.empty();
	   }
       @Override
	   public void onPlace(BlockState p_54754_, Level p_54755_, BlockPos p_54756_, BlockState p_54757_, boolean p_54758_) {
	      if (this.shouldSpreadLiquid(p_54755_, p_54756_, p_54754_)) {
	         p_54755_.getLiquidTicks().scheduleTick(p_54756_, p_54754_.getFluidState().getType(), getFluid().getTickDelay(p_54755_));
	      }

	   }
       @Override
	   public BlockState updateShape(BlockState p_54723_, Direction p_54724_, BlockState p_54725_, LevelAccessor p_54726_, BlockPos p_54727_, BlockPos p_54728_) {
	      if (p_54723_.getFluidState().isSource() || p_54725_.getFluidState().isSource()) {
	         p_54726_.getLiquidTicks().scheduleTick(p_54727_, p_54723_.getFluidState().getType(), getFluid().getTickDelay(p_54726_));
	      }

	      return null;
	   }
       @Override
	   public void neighborChanged(BlockState p_54709_, Level p_54710_, BlockPos p_54711_, Block p_54712_, BlockPos p_54713_, boolean p_54714_) {
	      if (this.shouldSpreadLiquid(p_54710_, p_54711_, p_54709_)) {
	         p_54710_.getLiquidTicks().scheduleTick(p_54711_, p_54709_.getFluidState().getType(), getFluid().getTickDelay(p_54710_));
	      }

	   }
       
	   private boolean shouldSpreadLiquid(Level p_54697_, BlockPos p_54698_, BlockState p_54699_) {
	      if (getFluid().is(FluidTags.LAVA)) {
	         boolean flag = p_54697_.getBlockState(p_54698_.below()).is(Blocks.SOUL_SOIL);

	         for(Direction direction : POSSIBLE_FLOW_DIRECTIONS) {
	            BlockPos blockpos = p_54698_.relative(direction.getOpposite());
	            if (p_54697_.getFluidState(blockpos).is(FluidTags.WATER)) {
	               Block block = p_54697_.getFluidState(p_54698_).isSource() ? Blocks.OBSIDIAN : Blocks.COBBLESTONE;
	               p_54697_.setBlockAndUpdate(p_54698_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_54697_, p_54698_, p_54698_, block.defaultBlockState()));
	               this.fizz(p_54697_, p_54698_);
	               return false;
	            }

	            if (flag && p_54697_.getBlockState(blockpos).is(Blocks.BLUE_ICE)) {
	               p_54697_.setBlockAndUpdate(p_54698_, net.minecraftforge.event.ForgeEventFactory.fireFluidPlaceBlockEvent(p_54697_, p_54698_, p_54698_, Blocks.BASALT.defaultBlockState()));
	               this.fizz(p_54697_, p_54698_);
	               return false;
	            }
	         }
	      }

	      return true;
	   }

	   private void fizz(LevelAccessor p_54701_, BlockPos p_54702_) {
	      p_54701_.levelEvent(1501, p_54702_, 0);
	   }
       @Override
	   protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_54730_) {
	      p_54730_.add(LEVEL);
	   }
       @Override
	   public ItemStack pickupBlock(LevelAccessor p_153772_, BlockPos p_153773_, BlockState p_153774_) {
	      if (p_153774_.getValue(LEVEL) == 0) {
	         p_153772_.setBlock(p_153773_, Blocks.AIR.defaultBlockState(), 11);
	         return new ItemStack(getFluid().getBucket());
	      } else {
	         return ItemStack.EMPTY;
	      }
	   }

	   // Forge start
	   private final java.util.function.Supplier<? extends net.minecraft.world.level.material.Fluid> supplier;
	   @Override
	   public FlowingFluid getFluid() {
	      return (FlowingFluid)supplier.get();
	   }

	   private boolean fluidStateCacheInitialized = false;
	   @Override
	   protected synchronized void initFluidStateCache() {
	      if (fluidStateCacheInitialized == false) {
	         this.stateCache.add(getFluid().getSource(false));

	         for (int i = 1; i < 8; ++i)
	            this.stateCache.add(getFluid().getFlowing(8 - i, false));

	         this.stateCache.add(getFluid().getFlowing(8, true));
	         fluidStateCacheInitialized = true;
	      }
	   }
	   @Override
	   public Optional<SoundEvent> getPickupSound() {
	      return getFluid().getPickupSound();
	   }
}

 

 

And the vanilla LiquidBlock

 

[removed vanilla code - diesieben07]

Edited by diesieben07
Link to comment
Share on other sites

5 minutes ago, furiusmax55 said:

If I use that, an error arises when putting the liquid on the ground

log using vanilla class with the not deprecated constructor 

 

Spoiler
---- Minecraft Crash Report ----
// There are four lights!

Time: 15/9/21 12:53
Description: Unexpected error

java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.material.FlowingFluid.getTickDelay(net.minecraft.world.level.LevelReader)" because "this.fluid" is null
	at net.minecraft.world.level.block.LiquidBlock.updateShape(LiquidBlock.java:117) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.updateShape(BlockBehaviour.java:669) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.updateNeighbourShapes(BlockBehaviour.java:610) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.Level.markAndNotifyBlock(Level.java:246) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:213) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:177) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.item.BucketItem.emptyContents(BucketItem.java:146) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,xf:fml:forge:bucketitem}
	at net.minecraft.world.item.BucketItem.use(BucketItem.java:90) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,xf:fml:forge:bucketitem}
	at net.minecraft.world.item.ItemStack.use(ItemStack.java:243) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,xf:fml:forge:itemstack}
	at net.minecraft.client.multiplayer.MultiPlayerGameMode.useItem(MultiPlayerGameMode.java:337) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.startUseItem(Minecraft.java:1576) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.handleKeybinds(Minecraft.java:1829) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.tick(Minecraft.java:1647) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1015) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.run(Minecraft.java:660) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:186) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
	at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) ~[fmlloader-1.17.1-37.0.53.jar%233!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
	at net.minecraft.world.level.block.LiquidBlock.updateShape(LiquidBlock.java:117) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.updateShape(BlockBehaviour.java:669) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.updateNeighbourShapes(BlockBehaviour.java:610) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.Level.markAndNotifyBlock(Level.java:246) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:213) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:177) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.item.BucketItem.emptyContents(BucketItem.java:146) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,xf:fml:forge:bucketitem}
	at net.minecraft.world.item.BucketItem.use(BucketItem.java:90) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,xf:fml:forge:bucketitem}
	at net.minecraft.world.item.ItemStack.use(ItemStack.java:243) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,xf:fml:forge:itemstack}
	at net.minecraft.client.multiplayer.MultiPlayerGameMode.useItem(MultiPlayerGameMode.java:337) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.startUseItem(Minecraft.java:1576) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.handleKeybinds(Minecraft.java:1829) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
-- Affected level --
Details:
	All players: 1 total; [LocalPlayer['Dev'/43, l='ClientLevel', x=-35.50, y=4.00, z=132.50]]
	Chunk stats: 841, 529
	Level dimension: minecraft:overworld
	Level spawn location: World: (-32,4,128), Section: (at 0,4,0 in -2,0,8; chunk contains blocks -32,0,128 to -17,255,143), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
	Level time: 222 game time, 222 day time
	Server brand: forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.multiplayer.ClientLevel.fillReportDetails(ClientLevel.java:364) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.fillReport(Minecraft.java:2245) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.run(Minecraft.java:682) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:186) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?] {}
	at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) ~[fmlloader-1.17.1-37.0.53.jar%233!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.0.7.jar%238!:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:90) [bootstraplauncher-0.1.17.jar:?] {}


-- Last reload --
Details:
	Reload number: 1
	Reload reason: initial
	Finished: Yes
	Packs: Default, Mod Resources

-- System Details --
Details:
	Minecraft Version: 1.17.1
	Minecraft Version ID: 1.17.1
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 16.0.1, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
	Memory: 396807240 bytes (378 MiB) / 1749024768 bytes (1668 MiB) up to 4276092928 bytes (4078 MiB)
	CPUs: 16
	Processor Vendor: AuthenticAMD
	Processor Name: AMD Ryzen 7 2700X Eight-Core Processor         
	Identifier: AuthenticAMD Family 23 Model 8 Stepping 2
	Microarchitecture: Zen+
	Frequency (GHz): 3,69
	Number of physical packages: 1
	Number of physical CPUs: 8
	Number of logical CPUs: 16
	Graphics card #0 name: NVIDIA GeForce GTX 1050 Ti
	Graphics card #0 vendor: NVIDIA (0x10de)
	Graphics card #0 VRAM (MB): 4095,00
	Graphics card #0 deviceId: 0x1c82
	Graphics card #0 versionInfo: DriverVersion=27.21.14.5671
	Memory slot #0 capacity (MB): 8192,00
	Memory slot #0 clockSpeed (GHz): 2,67
	Memory slot #0 type: DDR4
	Memory slot #1 capacity (MB): 8192,00
	Memory slot #1 clockSpeed (GHz): 2,67
	Memory slot #1 type: DDR4
	Virtual memory max (MB): 20912,76
	Virtual memory used (MB): 12202,20
	Swap memory total (MB): 4608,00
	Swap memory used (MB): 5,98
	JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -XX:+ShowCodeDetailsInExceptionMessages
	Launched Version: MOD_DEV
	Backend library: LWJGL version 3.2.2 SNAPSHOT
	Backend API: GeForce GTX 1050 Ti/PCIe/SSE2 GL version 3.2.0 NVIDIA 456.71, NVIDIA Corporation
	Window size: 854x480
	GL Caps: Using framebuffer using OpenGL 3.2
	GL debug messages: 
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'forge'
	Type: Integrated Server (map_client.txt)
	Graphics mode: fast
	Resource Packs: 
	Current Language: English (US)
	CPU: 16x AMD Ryzen 7 2700X Eight-Core Processor 
	Player Count: 1 / 8; [ServerPlayer['Dev'/43, l='ServerLevel[New World]', x=-35.50, y=4.00, z=132.50]]
	Data Packs: vanilla, mod:arkanemagicka (incompatible), mod:forge
	ModLauncher: 9.0.7+91+master.8569cdf
	ModLauncher launch target: forgeclientuserdev
	ModLauncher naming: mcp
	ModLauncher services: 
		 eventbus PLUGINSERVICE 
		 object_holder_definalize PLUGINSERVICE 
		 runtime_enum_extender PLUGINSERVICE 
		 capability_inject_definalize PLUGINSERVICE 
		 accesstransformer PLUGINSERVICE 
		 runtimedistcleaner PLUGINSERVICE 
		 fml TRANSFORMATIONSERVICE 
	FML Language Providers: 
		minecraft@1.0
		javafml@null
	Mod List: 
		forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp|Minecraft                     |minecraft                     |1.17.1              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
		main                                              |Arkane Magicka                |arkanemagicka                 |0.0NONE             |DONE      |Manifest: NOSIGNATURE
		                                                  |Forge                         |forge                         |37.0.53             |DONE      |Manifest: NOSIGNATURE
	Crash Report UUID: a7bb91a3-332c-41d5-b6ce-429328998f4d
	FML: 37.0
	Forge: net.minecraftforge:37.0.53

 

 

Link to comment
Share on other sites

8 minutes ago, furiusmax55 said:

I'm going to try it

same error as at the beginning
 

Spoiler
---- Minecraft Crash Report ----
// You're mean.

Time: 15/9/21 13:07
Description: Exception while ticking

java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.block.state.BlockState.isAir()" because "p_49910_" is null
	at net.minecraft.world.level.block.Block.updateOrDestroy(Block.java:158) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.updateNeighbourShapes(BlockBehaviour.java:611) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.Level.markAndNotifyBlock(Level.java:246) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:213) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:177) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.material.FlowingFluid.spreadTo(FlowingFluid.java:244) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.spreadToSides(FlowingFluid.java:146) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.spread(FlowingFluid.java:125) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.tick(FlowingFluid.java:410) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FluidState.tick(FluidState.java:73) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.server.level.ServerLevel.tickLiquid(ServerLevel.java:602) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.ServerTickList.tick(ServerTickList.java:78) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:341) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:882) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:818) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:85) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:683) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at java.lang.Thread.run(Thread.java:831) [?:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Server thread
Stacktrace:
	at net.minecraft.world.level.block.Block.updateOrDestroy(Block.java:158) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.updateNeighbourShapes(BlockBehaviour.java:611) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.Level.markAndNotifyBlock(Level.java:246) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:213) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.Level.setBlock(Level.java:177) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.world.level.material.FlowingFluid.spreadTo(FlowingFluid.java:244) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.spreadToSides(FlowingFluid.java:146) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.spread(FlowingFluid.java:125) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FlowingFluid.tick(FlowingFluid.java:410) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.world.level.material.FluidState.tick(FluidState.java:73) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.server.level.ServerLevel.tickLiquid(ServerLevel.java:602) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
-- Block being ticked --
Details:
	Block location: World: (1,4,83), Section: (at 1,4,3 in 0,0,5; chunk contains blocks 0,0,80 to 15,255,95), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Stacktrace:
	at net.minecraft.world.level.ServerTickList.tick(ServerTickList.java:78) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading}
	at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:341) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}


-- Affected level --
Details:
	All players: 1 total; [ServerPlayer['Dev'/1, l='ServerLevel[New World]', x=1.50, y=4.00, z=81.50]]
	Chunk stats: 2209
	Level dimension: minecraft:overworld
	Level spawn location: World: (0,4,80), Section: (at 0,4,0 in 0,0,5; chunk contains blocks 0,0,80 to 15,255,95), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
	Level time: 222 game time, 222 day time
	Level name: New World
	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
	Level weather: Rain time: 55367 (now: false), thunder time: 96462 (now: false)
	Known server brands: forge
	Level was modded: true
	Level storage version: 0x04ABD - Anvil
Stacktrace:
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:882) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:818) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:85) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:683) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258) ~[forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
	at java.lang.Thread.run(Thread.java:831) [?:?] {}


-- System Details --
Details:
	Minecraft Version: 1.17.1
	Minecraft Version ID: 1.17.1
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 16.0.1, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
	Memory: 1601519504 bytes (1527 MiB) / 2080374784 bytes (1984 MiB) up to 4276092928 bytes (4078 MiB)
	CPUs: 16
	Processor Vendor: AuthenticAMD
	Processor Name: AMD Ryzen 7 2700X Eight-Core Processor         
	Identifier: AuthenticAMD Family 23 Model 8 Stepping 2
	Microarchitecture: Zen+
	Frequency (GHz): 3,69
	Number of physical packages: 1
	Number of physical CPUs: 8
	Number of logical CPUs: 16
	Graphics card #0 name: NVIDIA GeForce GTX 1050 Ti
	Graphics card #0 vendor: NVIDIA (0x10de)
	Graphics card #0 VRAM (MB): 4095,00
	Graphics card #0 deviceId: 0x1c82
	Graphics card #0 versionInfo: DriverVersion=27.21.14.5671
	Memory slot #0 capacity (MB): 8192,00
	Memory slot #0 clockSpeed (GHz): 2,67
	Memory slot #0 type: DDR4
	Memory slot #1 capacity (MB): 8192,00
	Memory slot #1 clockSpeed (GHz): 2,67
	Memory slot #1 type: DDR4
	Virtual memory max (MB): 20912,76
	Virtual memory used (MB): 12844,72
	Swap memory total (MB): 4608,00
	Swap memory used (MB): 31,44
	JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -XX:+ShowCodeDetailsInExceptionMessages
	Player Count: 1 / 8; [ServerPlayer['Dev'/1, l='ServerLevel[New World]', x=1.50, y=4.00, z=81.50]]
	Data Packs: vanilla, mod:arkanemagicka (incompatible), mod:forge
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'forge'
	ModLauncher: 9.0.7+91+master.8569cdf
	ModLauncher launch target: forgeclientuserdev
	ModLauncher naming: mcp
	ModLauncher services: 
		 eventbus PLUGINSERVICE 
		 object_holder_definalize PLUGINSERVICE 
		 runtime_enum_extender PLUGINSERVICE 
		 capability_inject_definalize PLUGINSERVICE 
		 accesstransformer PLUGINSERVICE 
		 runtimedistcleaner PLUGINSERVICE 
		 fml TRANSFORMATIONSERVICE 
	FML Language Providers: 
		minecraft@1.0
		javafml@null
	Mod List: 
		forge-1.17.1-37.0.53_mapped_official_1.17.1-recomp|Minecraft                     |minecraft                     |1.17.1              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
		main                                              |Arkane Magicka                |arkanemagicka                 |0.0NONE             |DONE      |Manifest: NOSIGNATURE
		                                                  |Forge                         |forge                         |37.0.53             |DONE      |Manifest: NOSIGNATURE
	Crash Report UUID: a564e65f-0b2e-4eba-b355-c1ac7008e8b5
	FML: 37.0
	Forge: net.minecraftforge:37.0.53

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello, I'm trying to modify the effects of native enchantments for bows and arrows in Minecraft. After using a decompilation tool, I found that the specific implementations of native bow and arrow enchantments (including `ArrowDamageEnchantment`, `ArrowKnockbackEnchantment`, `ArrowFireEnchantment`, `ArrowInfiniteEnchantment`, `ArrowPiercingEnchantment`) do not contain any information about the enchantment effects (such as the `getDamageProtection` function for `ProtectionEnchantment`, `getDamageBonus` function for `DamageEnchantment`, etc.). Upon searching for the base class of arrows, `AbstractArrow`, I found a function named setEnchantmentEffectsFromEntity`, which seems to be used to retrieve the enchantment levels of the tool held by a `LivingEntity` and calculate the specific values of the enchantment effects. However, after testing with the following code, I found that this function is not being called:   @Mixin(AbstractArrow.class) public class ModifyArrowEnchantmentEffects {     private static final Logger LOGGER = LogUtils.getLogger();     @Inject(         method = "setEnchantmentEffectsFromEntity",         at = @At("HEAD")     )     private void logArrowEnchantmentEffectsFromEntity(CallbackInfo ci) {         LOGGER.info("Arrow enchantment effects from entity");     } }   Upon further investigation, I found that within the onHitEntity method, there are several lines of code:               if (!this.level().isClientSide &amp;&amp; entity1 instanceof LivingEntity) {                EnchantmentHelper.doPostHurtEffects(livingentity, entity1);                EnchantmentHelper.doPostDamageEffects((LivingEntity)entity1, livingentity);             }   These lines of code actually call the doPostHurt and doPostAttack methods of each enchantment in the enchantment list. However, this leads back to the issue because native bow and arrow enchantments do not implement these functions. Although their base class defines the functions, they are empty. At this point, I'm completely stumped and seeking assistance. Thank you.
    • I have been trying to make a server with forge but I keep running into an issue. I have jdk 22 installed as well as Java 8. here is the debug file  
    • it crashed again     What the console says : [00:02:03] [Server thread/INFO] [Easy NPC/]: [EntityManager] Server started! [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {iceandfire:fire_dragon_roost=true, iceandfire:fire_lily=true, iceandfire:spawn_dragon_skeleton_fire=true, iceandfire:lightning_dragon_roost=true, iceandfire:spawn_dragon_skeleton_lightning=true, iceandfire:ice_dragon_roost=true, iceandfire:ice_dragon_cave=true, iceandfire:lightning_dragon_cave=true, iceandfire:cyclops_cave=true, iceandfire:spawn_wandering_cyclops=true, iceandfire:spawn_sea_serpent=true, iceandfire:frost_lily=true, iceandfire:hydra_cave=true, iceandfire:lightning_lily=true, iceandfireixie_village=true, iceandfire:myrmex_hive_jungle=true, iceandfire:myrmex_hive_desert=true, iceandfire:silver_ore=true, iceandfire:siren_island=true, iceandfire:spawn_dragon_skeleton_ice=true, iceandfire:spawn_stymphalian_bird=true, iceandfire:fire_dragon_cave=true, iceandfire:sapphire_ore=true, iceandfire:spawn_hippocampus=true, iceandfire:spawn_death_worm=true} [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {TROLL_S=true, HIPPOGRYPH=true, AMPHITHERE=true, COCKATRICE=true, TROLL_M=true, DREAD_LICH=true, TROLL_F=true} [00:02:03] [Server thread/INFO] [ne.be.lo.WeaponRegistry/]: Encoded Weapon Attribute registry size (with package overhead): 41976 bytes (in 5 string chunks with the size of 10000) [00:02:03] [Server thread/INFO] [patchouli/]: Sending reload packet to clients [00:02:03] [Server thread/WARN] [voicechat/]: [voicechat] Running in offline mode - Voice chat encryption is not secure! [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Using server-ip as bind address: 0.0.0.0 [00:02:03] [Server thread/WARN] [ModernFix/]: Dedicated server took 22.521 seconds to load [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Voice chat server started at 0.0.0.0:25565 [00:02:03] [Server thread/WARN] [minecraft/SynchedEntityData]: defineId called for: class net.minecraft.world.entity.player.Player from class tschipp.carryon.common.carry.CarryOnDataManager [00:02:03] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@2941ffd5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 0 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 1 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 2 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 3 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 4 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 6 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 7 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 8 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 9 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 10 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 11 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 12 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 13 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 14 [00:02:19] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@ebc7ef2 [00:02:19] [Server thread/INFO] [minecraft/PlayerList]: ZacAdos[/90.2.17.162:49242] logged in with entity id 1062 at (-1848.6727005281205, 221.0, -3054.2468255848935) [00:02:19] [Server thread/ERROR] [ModernFix/]: Skipping entity ID sync for com.talhanation.smallships.world.entity.ship.Ship: java.lang.NoClassDefFoundError: net/minecraft/client/CameraType [00:02:19] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos joined the game [00:02:19] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:19] [Server thread/INFO] [se.mi.te.da.DataManager/]: Sending data to client: ZacAdos [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Received secret request of - Gloop - ZacAdos (17) [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Sent secret to - Gloop - ZacAdos [00:02:21] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully authenticated player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully validated connection of player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Player - Gloop - ZacAdos (cc56befd-d376-3526-a760-340713c478bd) successfully connected to voice chat stop [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping the server [00:02:34] [Server thread/INFO] [mo.pl.ar.ArmourersWorkshop/]: stop local service [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving players [00:02:34] [Server thread/INFO] [minecraft/ServerGamePacketListenerImpl]: ZacAdos lost connection: Server closed [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos left the game [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving worlds [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (world): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage: All dimensions are saved [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopping IO worker... [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopped IO worker! [00:02:34] [Server thread/INFO] [Calio/]: Removing Dynamic Registries for: net.minecraft.server.dedicated.DedicatedServer@7dc879e1 [MineStrator Daemon]: Checking server disk space usage, this could take a few seconds... [MineStrator Daemon]: Updating process configuration files... [MineStrator Daemon]: Ensuring file permissions are set correctly, this could take a few seconds... [MineStrator Daemon]: Pulling Docker container image, this could take a few minutes to complete... [MineStrator Daemon]: Finished pulling Docker container image container@pterodactyl~ java -version openjdk version "17.0.10" 2024-01-16 OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7) OpenJDK 64-Bit Server VM Temurin-17.0.10+7 (build 17.0.10+7, mixed mode, sharing) container@pterodactyl~ java -Xms128M -Xmx6302M -Dterminal.jline=false -Dterminal.ansi=true -Djline.terminal=jline.UnsupportedTerminal -p libraries/cpw/mods/bootstraplauncher/1.1.2/bootstraplauncher-1.1.2.jar:libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/net/minecraftforge/JarJarFileSystems/0.3.16/JarJarFileSystems-0.3.16.jar --add-modules ALL-MODULE-PATH --add-opens java.base/java.util.jar=cpw.mods.securejarhandler --add-opens java.base/java.lang.invoke=cpw.mods.securejarhandler --add-exports java.base/sun.security.util=cpw.mods.securejarhandler --add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming -Djava.net.preferIPv6Addresses=system -DignoreList=bootstraplauncher-1.1.2.jar,securejarhandler-2.1.4.jar,asm-commons-9.5.jar,asm-util-9.5.jar,asm-analysis-9.5.jar,asm-tree-9.5.jar,asm-9.5.jar,JarJarFileSystems-0.3.16.jar -DlibraryDirectory=libraries -DlegacyClassPath=libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/net/minecraftforge/accesstransformers/8.0.4/accesstransformers-8.0.4.jar:libraries/org/antlr/antlr4-runtime/4.9.1/antlr4-runtime-4.9.1.jar:libraries/net/minecraftforge/eventbus/6.0.3/eventbus-6.0.3.jar:libraries/net/minecraftforge/forgespi/6.0.0/forgespi-6.0.0.jar:libraries/net/minecraftforge/coremods/5.0.1/coremods-5.0.1.jar:libraries/cpw/mods/modlauncher/10.0.8/modlauncher-10.0.8.jar:libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar:libraries/com/electronwill/night-config/core/3.6.4/core-3.6.4.jar:libraries/com/electronwill/night-config/toml/3.6.4/toml-3.6.4.jar:libraries/org/apache/maven/maven-artifact/3.8.5/maven-artifact-3.8.5.jar:libraries/net/jodah/typetools/0.8.3/typetools-0.8.3.jar:libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar:libraries/org/jline/jline-reader/3.12.1/jline-reader-3.12.1.jar:libraries/org/jline/jline-terminal/3.12.1/jline-terminal-3.12.1.jar:libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar:libraries/org/openjdk/nashorn/nashorn-core/15.3/nashorn-core-15.3.jar:libraries/net/minecraftforge/JarJarSelector/0.3.16/JarJarSelector-0.3.16.jar:libraries/net/minecraftforge/JarJarMetadata/0.3.16/JarJarMetadata-0.3.16.jar:libraries/net/minecraftforge/fmlloader/1.19.2-43.3.0/fmlloader-1.19.2-43.3.0.jar:libraries/net/minecraft/server/1.19.2-20220805.130853/server-1.19.2-20220805.130853-extra.jar:libraries/com/github/oshi/oshi-core/5.8.5/oshi-core-5.8.5.jar:libraries/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar:libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:libraries/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar:libraries/com/mojang/authlib/3.11.49/authlib-3.11.49.jar:libraries/com/mojang/brigadier/1.0.18/brigadier-1.0.18.jar:libraries/com/mojang/datafixerupper/5.0.28/datafixerupper-5.0.28.jar:libraries/com/mojang/javabridge/1.2.24/javabridge-1.2.24.jar:libraries/com/mojang/logging/1.0.0/logging-1.0.0.jar:libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar:libraries/io/netty/netty-buffer/4.1.77.Final/netty-buffer-4.1.77.Final.jar:libraries/io/netty/netty-codec/4.1.77.Final/netty-codec-4.1.77.Final.jar:libraries/io/netty/netty-common/4.1.77.Final/netty-common-4.1.77.Final.jar:libraries/io/netty/netty-handler/4.1.77.Final/netty-handler-4.1.77.Final.jar:libraries/io/netty/netty-resolver/4.1.77.Final/netty-resolver-4.1.77.Final.jar:libraries/io/netty/netty-transport/4.1.77.Final/netty-transport-4.1.77.Final.jar:libraries/io/netty/netty-transport-classes-epoll/4.1.77.Final/netty-transport-classes-epoll-4.1.77.Final.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-x86_64.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-aarch_64.jar:libraries/io/netty/netty-transport-native-unix-common/4.1.77.Final/netty-transport-native-unix-common-4.1.77.Final.jar:libraries/it/unimi/dsi/fastutil/8.5.6/fastutil-8.5.6.jar:libraries/net/java/dev/jna/jna/5.10.0/jna-5.10.0.jar:libraries/net/java/dev/jna/jna-platform/5.10.0/jna-platform-5.10.0.jar:libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:libraries/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-core/2.17.0/log4j-core-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-slf4j18-impl/2.17.0/log4j-slf4j18-impl-2.17.0.jar:libraries/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar cpw.mods.bootstraplauncher.BootstrapLauncher --launchTarget forgeserver --fml.forgeVersion 43.3.0 --fml.mcVersion 1.19.2 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20220805.130853 [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [00:02:43] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [00:02:44] [main/INFO] [ne.mi.fm.lo.mo.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection Latest log [29Mar2024 00:02:42.803] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [29Mar2024 00:02:42.805] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [29Mar2024 00:02:43.548] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [29Mar2024 00:02:43.876] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.878] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:44.033] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [29Mar2024 00:02:44.034] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [29Mar2024 00:02:44.034] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection
    • I am unable to do that. Brigadier is a mojang library that parses commands.
  • Topics

×
×
  • Create New...

Important Information

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