This commit is contained in:
gnembon committed 2020-03-11 15:39:28 -03:00
1 parent 877863819c
commit a09ab80b4e
7 files changed
+10 -16

No files matched your search

+2 -2
View File
@@ -4,8 +4,8 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html
minecraft_version=20w10a
yarn_mappings=20w10a+build.20
minecraft_version=20w11a
yarn_mappings=20w11a+build.1
loader_version=0.7.8+build.187
# Mod Properties
@@ -89,7 +89,7 @@ public class FeatureGenerator
@Override
public BiomeSource getBiomeSource()
{
return new VanillaLayeredBiomeSource(new VanillaLayeredBiomeSourceConfig(w.getLevelProperties()))
return new VanillaLayeredBiomeSource(new VanillaLayeredBiomeSourceConfig(w.getLevelProperties().getSeed()))
{
@Override
public Biome getBiomeForNoiseGen(int i, int j, int k)
@@ -11,13 +11,5 @@ import java.util.Random;
@Mixin(ExplosiveProjectileEntity.class)
public class ExplosiveProjectileEntity_extremeMixin
{
@Redirect(method = "<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/entity/LivingEntity;DDDLnet/minecraft/world/World;)V",
expect = 3, at = @At(
value = "INVOKE",
target = "Ljava/util/Random;nextGaussian()D"
))
private double nextGauBian(Random random)
{
return RandomTools.nextGauBian(random);
}
//intentonally left blank until becomes master
}
@@ -2,6 +2,7 @@ package carpet.mixins;
import carpet.CarpetServer;
import com.google.gson.JsonElement;
import net.minecraft.class_4952;
import net.minecraft.server.integrated.IntegratedServer;
import net.minecraft.world.level.LevelGeneratorType;
import org.spongepowered.asm.mixin.Mixin;
@@ -13,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public class IntegratedServerMixin
{
@Inject(method = "loadWorld", at = @At("HEAD"))
private void onSetupServerIntegrated(String string_1, String string_2, long long_1, LevelGeneratorType levelGeneratorType_1, JsonElement jsonElement_1, CallbackInfo ci) {
private void onSetupServerIntegrated(String name, String serverName, long seed, class_4952 arg, CallbackInfo ci) {
CarpetServer.onServerLoaded((IntegratedServer) (Object) this);
}
}
@@ -14,7 +14,7 @@ public class MinecraftDedicatedServerMixin
// this.tickWorlds(booleanSupplier_1);
@Inject(method = "setupServer", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/dedicated/MinecraftDedicatedServer;loadWorld(Ljava/lang/String;Ljava/lang/String;JLnet/minecraft/world/level/LevelGeneratorType;Lcom/google/gson/JsonElement;)V",
target = "Lnet/minecraft/server/dedicated/MinecraftDedicatedServer;loadWorld(Ljava/lang/String;Ljava/lang/String;JLnet/minecraft/class_4952;)V",
shift = At.Shift.BEFORE
))
private void onSetupServer(CallbackInfoReturnable<Boolean> cir) {
@@ -2,6 +2,7 @@ package carpet.mixins;
import carpet.CarpetServer;
import com.google.gson.JsonElement;
import net.minecraft.class_4952;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.level.LevelGeneratorType;
import org.spongepowered.asm.mixin.Mixin;
@@ -31,7 +32,7 @@ public abstract class MinecraftServer_coreMixin
// Dedicated server only
@Inject(method = "loadWorld", at = @At("HEAD"))
private void serverLoaded(String string_1, String string_2, long long_1, LevelGeneratorType levelGeneratorType_1, JsonElement jsonElement_1, CallbackInfo ci)
private void serverLoaded(String name, String serverName, long seed, class_4952 arg, CallbackInfo ci)
{
CarpetServer.onServerLoaded((MinecraftServer) (Object) this);
}
@@ -22,7 +22,7 @@ public class ServerWorld_onePlayerSleepingMixin
@Shadow private boolean allPlayersSleeping;
@Inject(method = "updatePlayersSleeping", cancellable = true, at = @At("HEAD"))
@Inject(method = "updateSleepingPlayers", cancellable = true, at = @At("HEAD"))
private void updateOnePlayerSleeping(CallbackInfo ci)
{
if(CarpetSettings.onePlayerSleeping)