updated to 1.14.3 pre 2, still issues with fabric spawn tracking mappings
This commit is contained in:
1 parent
a5d83a0c53
commit
f3da8b2576
31 files changed
+180
-173
No files matched your search
@@ -5,13 +5,14 @@ import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.LightningEntity;
|
||||
import net.minecraft.entity.mob.SkeletonHorseEntity;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.server.command.SummonCommand;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.GameRules;
|
||||
import net.minecraft.world.LocalDifficulty;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -35,7 +36,7 @@ public class SummonCommandMixin
|
||||
ServerWorld world = source.getWorld();
|
||||
BlockPos at = new BlockPos(vec3d_1);
|
||||
LocalDifficulty localDifficulty_1 = source.getWorld().getLocalDifficulty(at);
|
||||
boolean boolean_2 = world.getGameRules().getBoolean("doMobSpawning") && world.random.nextDouble() < (double)localDifficulty_1.getLocalDifficulty() * 0.01D;
|
||||
boolean boolean_2 = world.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && world.random.nextDouble() < (double)localDifficulty_1.getLocalDifficulty() * 0.01D;
|
||||
if (boolean_2) {
|
||||
SkeletonHorseEntity skeletonHorseEntity_1 = (SkeletonHorseEntity) EntityType.SKELETON_HORSE.create(world);
|
||||
skeletonHorseEntity_1.setTrapped(true);
|
||||
@@ -44,7 +45,7 @@ public class SummonCommandMixin
|
||||
world.spawnEntity(skeletonHorseEntity_1);
|
||||
}
|
||||
world.addLightning(lightningEntity_1);
|
||||
source.sendFeedback(new TranslatableComponent("commands.summon.success", new Object[]{lightningEntity_1.getDisplayName()}), true);
|
||||
source.sendFeedback(new TranslatableText("commands.summon.success", new Object[]{lightningEntity_1.getDisplayName()}), true);
|
||||
cir.setReturnValue(1);
|
||||
cir.cancel();
|
||||
|
||||
|
||||
Reference in new issue
Block a user