mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Fixed PlayerSleepInBedEvent pos is always null Closes #5936
Fixed decompile error causing Endless Loop in ModelBackery if model errors exist. Fixed NPEs related to teleporting players without portals.
This commit is contained in:
1 parent
3d78f30d18
commit
a46b7cb67a
4 files changed
+40
-19
No files matched your search
@@ -27,7 +27,6 @@ import net.minecraft.command.arguments.EntityArgument;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
|
||||
import com.mojang.brigadier.builder.ArgumentBuilder;
|
||||
@@ -36,7 +35,6 @@ import com.mojang.brigadier.exceptions.DynamicCommandExceptionType;
|
||||
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class CommandSetDimension
|
||||
{
|
||||
@@ -65,8 +63,8 @@ public class CommandSetDimension
|
||||
//if (!DimensionManager.isDimensionRegistered(dim))
|
||||
// throw INVALID_DIMENSION.create(dim);
|
||||
|
||||
entities.stream().filter(e -> e.dimension == dim).forEach(e -> sender.sendFeedback(new TranslationTextComponent("commands.forge.setdim.invalid.nochange", e.getDisplayName(), dim), true));
|
||||
entities.stream().filter(e -> e.dimension != dim).forEach(e -> e.changeDimension(dim));
|
||||
entities.stream().filter(e -> e.dimension == dim).forEach(e -> sender.sendFeedback(new TranslationTextComponent("commands.forge.setdim.invalid.nochange", e.getDisplayName().getFormattedText(), dim), true));
|
||||
entities.stream().filter(e -> e.dimension != dim).forEach(e -> e.changeDimension(dim));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user