Fix
This commit is contained in:
parent
c20960c005
commit
5cb73c9774
27 changed files with 71 additions and 60 deletions
|
@ -30,6 +30,6 @@ public class DimensionalDoorsClientInitializer implements ClientModInitializer {
|
|||
ModBlocks.initClient();
|
||||
ModParticleTypes.initClient();
|
||||
|
||||
ClientPlayNetworking.registerReceiver(DimensionalDoorsInitializer.MONOLITH_PARTICLE_PACKET, (client, networkHandler, buf, sender) -> MonolithEntity.spawnParticles(buf, client));
|
||||
ClientPlayNetworking.registerGlobalReceiver(DimensionalDoorsInitializer.MONOLITH_PARTICLE_PACKET, (client, networkHandler, buf, sender) -> MonolithEntity.spawnParticles(buf, client));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.dimdev.dimdoors.entity.stat;
|
||||
|
||||
import org.dimdev.dimdoors.mixin.StatsAccessor;
|
||||
import org.dimdev.dimdoors.mixin.accessor.StatsAccessor;
|
||||
|
||||
import net.minecraft.stat.StatFormatter;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.dimdev.dimdoors.mixin;
|
||||
package org.dimdev.dimdoors.mixin.accessor;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
|
@ -1,4 +1,4 @@
|
|||
package org.dimdev.dimdoors.mixin;
|
||||
package org.dimdev.dimdoors.mixin.accessor;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
|
@ -1,4 +1,4 @@
|
|||
package org.dimdev.dimdoors.mixin;
|
||||
package org.dimdev.dimdoors.mixin.accessor;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
|
@ -1,4 +1,4 @@
|
|||
package org.dimdev.dimdoors.mixin;
|
||||
package org.dimdev.dimdoors.mixin.accessor;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
|
@ -1,4 +1,4 @@
|
|||
package org.dimdev.dimdoors.mixin;
|
||||
package org.dimdev.dimdoors.mixin.accessor;
|
||||
|
||||
import java.util.OptionalLong;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.dimdev.dimdoors.mixin;
|
||||
package org.dimdev.dimdoors.mixin.accessor;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
|
@ -1,4 +1,4 @@
|
|||
package org.dimdev.dimdoors.mixin;
|
||||
package org.dimdev.dimdoors.mixin.accessor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
|
@ -1,4 +1,4 @@
|
|||
package org.dimdev.dimdoors.mixin;
|
||||
package org.dimdev.dimdoors.mixin.accessor;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.dimdev.dimdoors.mixin;
|
||||
package org.dimdev.dimdoors.mixin.accessor;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
|
@ -1,4 +1,4 @@
|
|||
package org.dimdev.dimdoors.mixin;
|
||||
package org.dimdev.dimdoors.mixin.accessor;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
|
@ -0,0 +1,33 @@
|
|||
package org.dimdev.dimdoors.mixin.client;
|
||||
|
||||
import org.dimdev.dimdoors.particle.ModParticleTypes;
|
||||
import org.dimdev.dimdoors.world.ModDimensions;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
|
||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Mixin(ClientPlayNetworkHandler.class)
|
||||
public class ClientPlayNetworkHandlerMixin {
|
||||
@Shadow
|
||||
private ClientWorld world;
|
||||
|
||||
@Inject(method = "onPlayerPositionLook", at = @At("RETURN"), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
public void onPlayerLookPositionPacket(PlayerPositionLookS2CPacket packet, CallbackInfo ci, PlayerEntity playerEntity, Vec3d vec3d, boolean bl, boolean bl2, boolean bl3, double f, double g, double j, double k, double n, double o, float p, float q) {
|
||||
if (ModDimensions.isLimboDimension(this.world)) {
|
||||
this.world.addParticle(ModParticleTypes.MONOLITH, playerEntity.getX(), playerEntity.getY(), playerEntity.getZ(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.dimdev.dimdoors.mixin.client;
|
||||
package org.dimdev.dimdoors.mixin.client.accessor;
|
||||
|
||||
import java.nio.FloatBuffer;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package org.dimdev.dimdoors.particle;
|
||||
|
||||
import org.dimdev.dimdoors.mixin.DefaultParticleTypeAccessor;
|
||||
import org.dimdev.dimdoors.mixin.accessor.DefaultParticleTypeAccessor;
|
||||
import org.dimdev.dimdoors.particle.client.MonolithParticle;
|
||||
|
||||
import net.minecraft.particle.DefaultParticleType;
|
||||
|
@ -12,7 +12,7 @@ import net.fabricmc.api.Environment;
|
|||
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry;
|
||||
|
||||
public class ModParticleTypes {
|
||||
public static final DefaultParticleType MONOLITH = DefaultParticleTypeAccessor.createDefaultParticleType(false);
|
||||
public static final DefaultParticleType MONOLITH = DefaultParticleTypeAccessor.createDefaultParticleType(true);
|
||||
|
||||
public static void init() {
|
||||
Registry.register(Registry.PARTICLE_TYPE, new Identifier("dimdoors", "monolith"), MONOLITH);
|
||||
|
|
|
@ -31,6 +31,7 @@ public class MonolithParticle extends Particle {
|
|||
this.maxAge = 30;
|
||||
this.model = new MonolithModel();
|
||||
this.layer = RenderLayer.getEntitySolid(MonolithRenderer.MONOLITH_TEXTURES.get(14));
|
||||
layer.endDrawing();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package org.dimdev.dimdoors.world;
|
||||
|
||||
public class LimboEntityPlacer {
|
||||
// @Override
|
||||
// public BlockPattern.Result placeEntity(Entity entity, ServerWorld serverWorld, Direction direction, double v, double v1) {
|
||||
// return null;
|
||||
// }
|
||||
// @Override
|
||||
// public BlockPattern.TeleportTarget placeEntity(Entity entity, ServerWorld serverWorld, Direction direction, double v, double v1) {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
|
||||
}
|
|
@ -2,7 +2,7 @@ package org.dimdev.dimdoors.world;
|
|||
|
||||
import org.dimdev.dimdoors.block.ModBlocks;
|
||||
import org.dimdev.dimdoors.entity.ModEntityTypes;
|
||||
import org.dimdev.dimdoors.mixin.BuiltinBiomesAccessor;
|
||||
import org.dimdev.dimdoors.mixin.accessor.BuiltinBiomesAccessor;
|
||||
import org.dimdev.dimdoors.sound.ModSoundEvents;
|
||||
import org.dimdev.dimdoors.world.feature.ModFeatures;
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import java.util.OptionalLong;
|
|||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import org.dimdev.dimdoors.block.ModBlocks;
|
||||
import org.dimdev.dimdoors.mixin.ChunkGeneratorSettingsAccessor;
|
||||
import org.dimdev.dimdoors.mixin.DimensionTypeAccessor;
|
||||
import org.dimdev.dimdoors.mixin.accessor.ChunkGeneratorSettingsAccessor;
|
||||
import org.dimdev.dimdoors.mixin.accessor.DimensionTypeAccessor;
|
||||
import org.dimdev.dimdoors.world.limbo.LimboChunkGenerator;
|
||||
import org.dimdev.dimdoors.world.pocket.BlankChunkGenerator;
|
||||
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
package org.dimdev.dimdoors.world;
|
||||
|
||||
//import net.fabricmc.fabric.api.dimension.v1.EntityPlacer;
|
||||
|
||||
public class PocketDimensionPlacer {
|
||||
// @Override
|
||||
// public BlockPattern.TeleportTarget placeEntity(Entity entity, ServerWorld serverWorld, Direction direction, double v, double v1) {
|
||||
// return null;
|
||||
// }
|
||||
}
|
|
@ -6,7 +6,7 @@ import java.util.function.Supplier;
|
|||
|
||||
import org.dimdev.dimdoors.ModConfig;
|
||||
import org.dimdev.dimdoors.block.ModBlocks;
|
||||
import org.dimdev.dimdoors.mixin.GenerationSettingsAccessor;
|
||||
import org.dimdev.dimdoors.mixin.accessor.GenerationSettingsAccessor;
|
||||
import org.dimdev.dimdoors.world.feature.decorator.EternalFluidLakeDecorator;
|
||||
import org.dimdev.dimdoors.world.feature.gateway.LimboGatewayFeature;
|
||||
import org.dimdev.dimdoors.world.feature.gateway.schematic.SandstonePillarsV2Gateway;
|
||||
|
@ -22,7 +22,6 @@ import net.minecraft.world.biome.Biome;
|
|||
import net.minecraft.world.gen.GenerationStep;
|
||||
import net.minecraft.world.gen.decorator.ChanceDecoratorConfig;
|
||||
import net.minecraft.world.gen.decorator.Decorator;
|
||||
import net.minecraft.world.gen.decorator.RangeDecoratorConfig;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeatures;
|
||||
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.dimdev.dimdoors.mixin.BuiltinBiomesAccessor;
|
||||
import org.dimdev.dimdoors.mixin.accessor.BuiltinBiomesAccessor;
|
||||
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
|
|
@ -11,7 +11,7 @@ import it.unimi.dsi.fastutil.objects.ObjectArrayList;
|
|||
import it.unimi.dsi.fastutil.objects.ObjectList;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectListIterator;
|
||||
import org.dimdev.dimdoors.block.ModBlocks;
|
||||
import org.dimdev.dimdoors.mixin.ChunkGeneratorAccessor;
|
||||
import org.dimdev.dimdoors.mixin.accessor.ChunkGeneratorAccessor;
|
||||
import org.dimdev.dimdoors.world.ModBiomes;
|
||||
import org.dimdev.dimdoors.world.ModDimensions;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{}
|
|
@ -3,24 +3,25 @@
|
|||
"package": "org.dimdev.dimdoors.mixin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"mixins": [
|
||||
"BuiltinBiomesAccessor",
|
||||
"ChunkGeneratorAccessor",
|
||||
"ChunkGeneratorSettingsAccessor",
|
||||
"DefaultBiomeFeaturesMixin",
|
||||
"DefaultParticleTypeAccessor",
|
||||
"DimensionTypeAccessor",
|
||||
"DirectionAccessor",
|
||||
"GenerationSettingsAccessor",
|
||||
"ListTagAccessor",
|
||||
"PlayerEntityMixin",
|
||||
"RedstoneWireBlockAccessor",
|
||||
"RegistryKeyMixin",
|
||||
"ServerPlayerEntityMixin",
|
||||
"StatsAccessor"
|
||||
"accessor.BuiltinBiomesAccessor",
|
||||
"accessor.ChunkGeneratorAccessor",
|
||||
"accessor.ChunkGeneratorSettingsAccessor",
|
||||
"accessor.DefaultParticleTypeAccessor",
|
||||
"accessor.DimensionTypeAccessor",
|
||||
"accessor.DirectionAccessor",
|
||||
"accessor.GenerationSettingsAccessor",
|
||||
"accessor.ListTagAccessor",
|
||||
"accessor.RedstoneWireBlockAccessor",
|
||||
"accessor.StatsAccessor"
|
||||
],
|
||||
"client": [
|
||||
"client.GlStateManagerAccessor",
|
||||
"client.InGameHudMixin"
|
||||
"client.InGameHudMixin",
|
||||
"client.ClientPlayNetworkHandlerMixin",
|
||||
"client.accessor.GlStateManagerAccessor"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package org.dimdev.dimdoors.util.schematic;
|
||||
|
||||
import org.dimdev.dimdoors.mixin.RedstoneWireBlockAccessor;
|
||||
import org.dimdev.dimdoors.mixin.accessor.RedstoneWireBlockAccessor;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Objects;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.dimdev.dimdoors.mixin.ListTagAccessor;
|
||||
import org.dimdev.dimdoors.mixin.accessor.ListTagAccessor;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
|
|
Loading…
Reference in a new issue