23w45a fixes and unmaintainable optimized TNT rule pseudofix.
This commit is contained in:
1 parent
e1bd03cbef
commit
5c1da81b9f
9 files changed
+53
-20
No files matched your search
@@ -38,6 +38,7 @@ import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.HolderSet;
|
||||
import net.minecraft.core.QuartPos;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
@@ -46,6 +47,7 @@ import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.level.Ticket;
|
||||
import net.minecraft.server.level.TicketType;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.level.chunk.PalettedContainer;
|
||||
@@ -1066,7 +1068,7 @@ public class WorldAccess
|
||||
float thePowah = powah;
|
||||
|
||||
// copy of ServerWorld.createExplosion #TRACK#
|
||||
Explosion explosion = new Explosion(cc.level(), source, null, null, pos.x, pos.y, pos.z, powah, createFire, mode)
|
||||
Explosion explosion = new Explosion(cc.level(), source, null, null, pos.x, pos.y, pos.z, powah, createFire, mode, ParticleTypes.EXPLOSION, ParticleTypes.EXPLOSION_EMITTER, SoundEvents.GENERIC_EXPLODE)
|
||||
{
|
||||
@Override
|
||||
@Nullable
|
||||
@@ -1082,10 +1084,11 @@ public class WorldAccess
|
||||
{
|
||||
explosion.clearToBlow();
|
||||
}
|
||||
Explosion.BlockInteraction finalMode = mode;
|
||||
cc.level().players().forEach(spe -> {
|
||||
if (spe.distanceToSqr(pos) < 4096.0D)
|
||||
{
|
||||
spe.connection.send(new ClientboundExplodePacket(pos.x, pos.y, pos.z, thePowah, explosion.getToBlow(), explosion.getHitPlayers().get(spe)));
|
||||
spe.connection.send(new ClientboundExplodePacket(pos.x, pos.y, pos.z, thePowah, explosion.getToBlow(), explosion.getHitPlayers().get(spe), finalMode, ParticleTypes.EXPLOSION, ParticleTypes.EXPLOSION_EMITTER, SoundEvents.GENERIC_EXPLODE));
|
||||
}
|
||||
});
|
||||
return Value.TRUE;
|
||||
|
||||
Reference in new issue
Block a user