This commit is contained in:
gnembon committed 2021-10-20 23:05:27 -03:00
1 parent 0f4c418a0e
commit 074fd910cf
4 files changed
+11 -9

No files matched your search

+2 -2
View File
@@ -4,8 +4,8 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html # or better: https://modmuss50.me/fabric.html
minecraft_version=21w41a minecraft_version=21w42a
yarn_mappings=21w41a+build.21 yarn_mappings=21w42a+build.1
loader_version=0.12.2 loader_version=0.12.2
fabric_version=0.41.1+1.18 fabric_version=0.41.1+1.18
@@ -193,7 +193,7 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
@Inject(method = "tick", at = @At( @Inject(method = "tick", at = @At(
value = "INVOKE", value = "INVOKE",
target = "Lnet/minecraft/server/PlayerManager;saveAllPlayerData()V", target = "Lnet/minecraft/server/MinecraftServer;method_39218(ZZZ)Z", // save
shift = At.Shift.BEFORE shift = At.Shift.BEFORE
)) ))
private void startAutosave(BooleanSupplier booleanSupplier_1, CallbackInfo ci) private void startAutosave(BooleanSupplier booleanSupplier_1, CallbackInfo ci)
@@ -203,7 +203,7 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
@Inject(method = "tick", at = @At( @Inject(method = "tick", at = @At(
value = "INVOKE", value = "INVOKE",
target = "Lnet/minecraft/server/MinecraftServer;save(ZZZ)Z", target = "Lnet/minecraft/server/MinecraftServer;method_39218(ZZZ)Z",
shift = At.Shift.AFTER shift = At.Shift.AFTER
)) ))
private void finishAutosave(BooleanSupplier booleanSupplier_1, CallbackInfo ci) private void finishAutosave(BooleanSupplier booleanSupplier_1, CallbackInfo ci)
@@ -5,6 +5,7 @@ import carpet.fakes.MemoryInterface;
import carpet.helpers.ParticleDisplay; import carpet.helpers.ParticleDisplay;
import carpet.utils.Messenger; import carpet.utils.Messenger;
import carpet.utils.MobAI; import carpet.utils.MobAI;
import net.minecraft.block.Blocks;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;
import net.minecraft.entity.ai.brain.Activity; import net.minecraft.entity.ai.brain.Activity;
import net.minecraft.entity.ai.brain.Memory; import net.minecraft.entity.ai.brain.Memory;
@@ -16,6 +17,7 @@ import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BedItem; import net.minecraft.item.BedItem;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.Items; import net.minecraft.item.Items;
import net.minecraft.particle.BlockStateParticleEffect;
import net.minecraft.particle.ParticleTypes; import net.minecraft.particle.ParticleTypes;
import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld; import net.minecraft.server.world.ServerWorld;
@@ -125,7 +127,7 @@ public abstract class VillagerEntity_aiMixin extends MerchantEntity
if (bedPos == null || bedPos.getDimension() != world.getRegistryKey()) // get Dimension if (bedPos == null || bedPos.getDimension() != world.getRegistryKey()) // get Dimension
{ {
sayNo(); sayNo();
((ServerWorld) getEntityWorld()).spawnParticles(ParticleTypes.BARRIER, getX(), getY() + getStandingEyeHeight() + 1, getZ(), 1, 0.1, 0.1, 0.1, 0.0); ((ServerWorld) getEntityWorld()).spawnParticles(new BlockStateParticleEffect(ParticleTypes.BLOCK_MARKER, Blocks.BARRIER.getDefaultState()), getX(), getY() + getStandingEyeHeight() + 1, getZ(), 1, 0.1, 0.1, 0.1, 0.0);
} }
else else
{ {
@@ -158,7 +160,7 @@ public abstract class VillagerEntity_aiMixin extends MerchantEntity
pv.x, pv.y+1, pv.z, pv.x, pv.y+1, pv.z,
50, 0.1, 0.3, 0.1, 0.0); 50, 0.1, 0.3, 0.1, 0.0);
else else
((ServerWorld) getEntityWorld()).spawnParticles(ParticleTypes.BARRIER, ((ServerWorld) getEntityWorld()).spawnParticles(new BlockStateParticleEffect(ParticleTypes.BLOCK_MARKER, Blocks.BARRIER.getDefaultState()),
pv.x, pv.y+1, pv.z, pv.x, pv.y+1, pv.z,
1, 0.1, 0.1, 0.1, 0.0); 1, 0.1, 0.1, 0.1, 0.0);
} }
@@ -184,7 +186,7 @@ public abstract class VillagerEntity_aiMixin extends MerchantEntity
{ {
if (MobAI.isTracking(this, MobAI.TrackingType.IRON_GOLEM_SPAWNING)) if (MobAI.isTracking(this, MobAI.TrackingType.IRON_GOLEM_SPAWNING))
{ {
((ServerWorld) getEntityWorld()).spawnParticles(ParticleTypes.BARRIER, getX(), getY()+3, getZ(), 1, 0.1, 0.1, 0.1, 0.0); ((ServerWorld) getEntityWorld()).spawnParticles(new BlockStateParticleEffect(ParticleTypes.BLOCK_MARKER, Blocks.BARRIER.getDefaultState()), getX(), getY()+3, getZ(), 1, 0.1, 0.1, 0.1, 0.0);
} }
} }
@@ -99,7 +99,7 @@ public class WorldTools
DimensionType dimensionType2; DimensionType dimensionType2;
if (dimensionOptions == null) { if (dimensionOptions == null) {
dimensionType2 = server.getRegistryManager().getMutable(Registry.DIMENSION_TYPE_KEY).getOrThrow(DimensionType.OVERWORLD_REGISTRY_KEY); dimensionType2 = server.getRegistryManager().getMutable(Registry.DIMENSION_TYPE_KEY).getOrThrow(DimensionType.OVERWORLD_REGISTRY_KEY);
chunkGenerator2 = GeneratorOptions.createOverworldGenerator(server.getRegistryManager().get(Registry.BIOME_KEY), server.getRegistryManager().get(Registry.CHUNK_GENERATOR_SETTINGS_KEY), (new Random()).nextLong()); chunkGenerator2 = GeneratorOptions.createOverworldGenerator(server.getRegistryManager(), (new Random()).nextLong());
} else { } else {
dimensionType2 = dimensionOptions.getDimensionType(); dimensionType2 = dimensionOptions.getDimensionType();
chunkGenerator2 = dimensionOptions.getChunkGenerator(); chunkGenerator2 = dimensionOptions.getChunkGenerator();
@@ -114,7 +114,7 @@ public class WorldTools
// return server.getRegistryManager().get(Registry.CHUNK_GENERATOR_SETTINGS_KEY).getOrThrow(ChunkGeneratorSettings.OVERWORLD); // return server.getRegistryManager().get(Registry.CHUNK_GENERATOR_SETTINGS_KEY).getOrThrow(ChunkGeneratorSettings.OVERWORLD);
//}); //});
chunkGenerator2 = new NoiseChunkGenerator(MultiNoiseBiomeSource.Preset.OVERWORLD.getBiomeSource(server.getRegistryManager().get(Registry.BIOME_KEY)), seed, () -> { chunkGenerator2 = new NoiseChunkGenerator(server.getRegistryManager().get(Registry.NOISE_WORLDGEN), MultiNoiseBiomeSource.Preset.OVERWORLD.getBiomeSource(server.getRegistryManager().get(Registry.BIOME_KEY)), seed, () -> {
return server.getRegistryManager().get(Registry.CHUNK_GENERATOR_SETTINGS_KEY).getOrThrow(ChunkGeneratorSettings.OVERWORLD); return server.getRegistryManager().get(Registry.CHUNK_GENERATOR_SETTINGS_KEY).getOrThrow(ChunkGeneratorSettings.OVERWORLD);
}); });