Fixed compiler and Startup Errors
This commit is contained in:
parent
e2ab77658b
commit
08f35ab52c
9 changed files with 16 additions and 24 deletions
|
@ -29,7 +29,7 @@ public class BoneMealItemMixin {
|
|||
Level world = context.getLevel();
|
||||
BlockPos blockPos = context.getClickedPos();
|
||||
if (!world.isClientSide) {
|
||||
BlockPos offseted = blockPos.relative(context.getClickedFace());
|
||||
//BlockPos offset = blockPos.relative(context.getClickedFace());
|
||||
if (BonemealAPI.isTerrain(world.getBlockState(blockPos).getBlock())) {
|
||||
boolean consume = false;
|
||||
if (BonemealAPI.isSpreadableTerrain(world.getBlockState(blockPos).getBlock())) {
|
||||
|
|
|
@ -2,7 +2,9 @@ package ru.bclib.mixin.common;
|
|||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.server.level.WorldGenRegion;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.StructureFeatureManager;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.level.levelgen.WorldgenRandom;
|
||||
|
@ -12,17 +14,17 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
|||
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(Biome.class)
|
||||
public class BiomeMixin {
|
||||
@Mixin(ChunkGenerator.class)
|
||||
public class ChunkGeneratorMixin {
|
||||
private int bclib_featureIteratorSeed;
|
||||
|
||||
@ModifyArg(method = "generate", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/levelgen/WorldgenRandom;setFeatureSeed(JII)J"))
|
||||
@ModifyArg(method = "applyBiomeDecoration", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/levelgen/WorldgenRandom;setFeatureSeed(JII)V"))
|
||||
private long bclib_updateFeatureSeed(long seed) {
|
||||
return Long.rotateRight(seed, bclib_featureIteratorSeed++);
|
||||
}
|
||||
|
||||
@Inject(method = "generate", at = @At("HEAD"))
|
||||
private void bclib_obBiomeGenerate(StructureFeatureManager structureFeatureManager, ChunkGenerator chunkGenerator, WorldGenRegion worldGenRegion, long l, WorldgenRandom worldgenRandom, BlockPos blockPos, CallbackInfo info) {
|
||||
@Inject(method = "applyBiomeDecoration", at = @At("HEAD"))
|
||||
private void bclib_obBiomeGenerate(WorldGenLevel level, ChunkPos pos, StructureFeatureManager manager, CallbackInfo ci) {
|
||||
bclib_featureIteratorSeed = 0;
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@ import ru.bclib.api.datafixer.DataFixerAPI;
|
|||
|
||||
@Mixin(Main.class)
|
||||
abstract public class MainMixin {
|
||||
@ModifyArg(method="main", at=@At(value="INVOKE", target="Lnet/minecraft/server/MinecraftServer;convertFromRegionFormatIfNeeded(Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;)V"))
|
||||
@ModifyArg(method="main", at=@At(value="INVOKE_ASSIGN", target="Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;getSummary()Lnet/minecraft/world/level/storage/LevelSummary;"))
|
||||
private static LevelStorageSource.LevelStorageAccess bclib_callServerFix(LevelStorageSource.LevelStorageAccess session){
|
||||
DataFixerAPI.fixData(session, false, (didFix)->{/* not called when showUI==false */});
|
||||
return session;
|
||||
|
|
|
@ -49,15 +49,6 @@ public class MinecraftServerMixin {
|
|||
DataExchangeAPI.prepareServerside();
|
||||
}
|
||||
|
||||
@Inject(method = "convertFromRegionFormatIfNeeded", at = @At("HEAD"))
|
||||
private static void bclib_applyPatches(LevelStorageSource.LevelStorageAccess session, CallbackInfo ci) {
|
||||
|
||||
/*File levelPath = session.getLevelPath(LevelResource.ROOT).toFile();
|
||||
WorldDataAPI.load(new File(levelPath, "data"));
|
||||
DataFixerAPI.fixData(levelPath, session.getLevelId());*/
|
||||
}
|
||||
|
||||
|
||||
@Inject(method = "reloadResources", at = @At(value = "RETURN"), cancellable = true)
|
||||
private void bclib_reloadResources(Collection<String> collection, CallbackInfoReturnable<CompletableFuture<Void>> info) {
|
||||
bclib_injectRecipes();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue