mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 14:50:56 +00:00
terraScript random is no more
This commit is contained in:
+3
-2
@@ -1,6 +1,8 @@
|
||||
package com.dfsek.terra.mod.mixin.gameplay;
|
||||
|
||||
|
||||
import com.dfsek.terra.api.world.World;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.ai.brain.task.BoneMealTask;
|
||||
@@ -43,14 +45,13 @@ public class BoneMealTaskMixin {
|
||||
if(canGrow != null) {
|
||||
RandomGenerator random = MinecraftAdapter.adapt(world.getRandom());
|
||||
cir.setReturnValue(canGrow.generate(
|
||||
Vector3Int.of(pos.getX(), pos.getY(), pos.getZ()), (WritableWorld) world, random, Rotation.NONE));
|
||||
Vector3Int.of(pos.getX(), pos.getY(), pos.getZ()), (WritableWorld) world, Rotation.NONE, world.getSeed() + random.nextLong(Long.MAX_VALUE)));
|
||||
return;
|
||||
}
|
||||
cir.setReturnValue(true);
|
||||
return;
|
||||
}
|
||||
cir.setReturnValue(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class FertilizableUtil {
|
||||
Structure canGrow = config.getCanGrow();
|
||||
if(canGrow != null) {
|
||||
if(!canGrow.generate(
|
||||
Vector3Int.of(pos.getX(), pos.getY(), pos.getZ()), (WritableWorld) world, random, Rotation.NONE)) {
|
||||
Vector3Int.of(pos.getX(), pos.getY(), pos.getZ()), (WritableWorld) world, Rotation.NONE, world.getSeed() + random.nextLong(Long.MAX_VALUE))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class FertilizableUtil {
|
||||
}
|
||||
}
|
||||
config.getStructures().get(random).generate(
|
||||
Vector3Int.of(pos.getX(), pos.getY(), pos.getZ()), (WritableWorld) world, random, Rotation.NONE);
|
||||
Vector3Int.of(pos.getX(), pos.getY(), pos.getZ()), (WritableWorld) world, Rotation.NONE, world.getSeed() + random.nextLong(Long.MAX_VALUE));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user