From 9c96ee8bb88eaf222f2c780e03270c01c6412885 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Mon, 18 May 2020 15:51:24 +0200 Subject: [PATCH] Removed Symmetry Particles from block registry - Fixed fluid rendering in fan recipe JEI - Made symmetry mirror models partials instead of blockstates - Ported symmetry wand GUI Screen --- .../com/simibubi/create/AllBlockPartials.java | 4 + .../java/com/simibubi/create/AllBlocks.java | 10 +- .../category/ProcessingViaFanCategory.java | 26 +-- .../create/foundation/gui/GuiGameElement.java | 92 ++++++++--- .../curiosities/symmetry/SymmetryHandler.java | 103 +++++++----- .../symmetry/SymmetryWandScreen.java | 72 ++------- .../block/CrossPlaneSymmetryBlock.java | 27 ---- .../symmetry/block/PlaneSymmetryBlock.java | 26 --- .../symmetry/block/SymmetryBlock.java | 13 -- .../block/TriplePlaneSymmetryBlock.java | 12 -- .../symmetry/mirror/CrossPlaneMirror.java | 18 ++- .../symmetry/mirror/EmptyMirror.java | 3 +- .../symmetry/mirror/PlaneMirror.java | 17 +- .../symmetry/mirror/SymmetryMirror.java | 21 ++- .../symmetry/mirror/TriplePlaneMirror.java | 6 +- .../blockstates/symmetry_crossplane.json | 7 - .../create/blockstates/symmetry_plane.json | 6 - .../blockstates/symmetry_tripleplane.json | 5 - .../block/symmetry_crossplane_diagonal.json | 148 ------------------ .../crossplane.json} | 0 .../plane.json} | 0 .../tripleplane.json} | 0 .../create/textures/gui/wand_symmetry.png | Bin 1854 -> 1781 bytes 23 files changed, 218 insertions(+), 398 deletions(-) delete mode 100644 src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/CrossPlaneSymmetryBlock.java delete mode 100644 src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/PlaneSymmetryBlock.java delete mode 100644 src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/SymmetryBlock.java delete mode 100644 src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/TriplePlaneSymmetryBlock.java delete mode 100644 src/main/resources/assets/create/blockstates/symmetry_crossplane.json delete mode 100644 src/main/resources/assets/create/blockstates/symmetry_plane.json delete mode 100644 src/main/resources/assets/create/blockstates/symmetry_tripleplane.json delete mode 100644 src/main/resources/assets/create/models/block/symmetry_crossplane_diagonal.json rename src/main/resources/assets/create/models/block/{symmetry_crossplane.json => symmetry_effect/crossplane.json} (100%) rename src/main/resources/assets/create/models/block/{symmetry_plane.json => symmetry_effect/plane.json} (100%) rename src/main/resources/assets/create/models/block/{symmetry_tripleplane.json => symmetry_effect/tripleplane.json} (100%) diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index d847c29fd..b0429b7d4 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -70,6 +70,10 @@ public enum AllBlockPartials { ROPE_HALF_MAGNET("pulley/rope_half_magnet"), MILLSTONE_COG("millstone/inner"), + SYMMETRY_PLANE("symmetry_effect/plane"), + SYMMETRY_CROSSPLANE("symmetry_effect/crossplane"), + SYMMETRY_TRIPLEPLANE("symmetry_effect/tripleplane"), + ; private ResourceLocation modelLocation; diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 9026bfee6..5a2019729 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -52,9 +52,6 @@ import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock; import com.simibubi.create.modules.contraptions.relays.encased.AdjustablePulleyBlock; import com.simibubi.create.modules.contraptions.relays.encased.EncasedBeltBlock; import com.simibubi.create.modules.contraptions.relays.gauge.GaugeBlock; -import com.simibubi.create.modules.curiosities.symmetry.block.CrossPlaneSymmetryBlock; -import com.simibubi.create.modules.curiosities.symmetry.block.PlaneSymmetryBlock; -import com.simibubi.create.modules.curiosities.symmetry.block.TriplePlaneSymmetryBlock; import com.simibubi.create.modules.logistics.block.RedstoneLinkBlock; import com.simibubi.create.modules.logistics.block.StockswitchBlock; import com.simibubi.create.modules.logistics.block.belts.observer.BeltObserverBlock; @@ -95,7 +92,6 @@ import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.tags.BlockTags; import net.minecraft.tags.Tag; -import net.minecraft.world.storage.loot.LootTable; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -208,9 +204,9 @@ public enum AllBlocks implements NonNullSupplier { _4_(Sections.CURIOSITIES), - SYMMETRY_PLANE(PlaneSymmetryBlock::new, ComesWith.NO_BLOCKITEM), - SYMMETRY_CROSSPLANE(CrossPlaneSymmetryBlock::new, ComesWith.NO_BLOCKITEM), - SYMMETRY_TRIPLEPLANE(TriplePlaneSymmetryBlock::new, ComesWith.NO_BLOCKITEM), +// SYMMETRY_PLANE(PlaneSymmetryBlock::new, ComesWith.NO_BLOCKITEM), +// SYMMETRY_CROSSPLANE(CrossPlaneSymmetryBlock::new, ComesWith.NO_BLOCKITEM), +// SYMMETRY_TRIPLEPLANE(TriplePlaneSymmetryBlock::new, ComesWith.NO_BLOCKITEM), _5_(Sections.SCHEMATICS), diff --git a/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java index 78bc1c9c9..f5652d772 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java @@ -21,7 +21,7 @@ public abstract class ProcessingViaFanCategory> extends Cre public ProcessingViaFanCategory(String name, IDrawable icon) { super(name, icon, emptyBackground(177, 70)); } - + @Override public void setIngredients(T recipe, IIngredients ingredients) { ingredients.setInputIngredients(recipe.getIngredients()); @@ -32,7 +32,9 @@ public abstract class ProcessingViaFanCategory> extends Cre public void setRecipe(IRecipeLayout recipeLayout, T recipe, IIngredients ingredients) { IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks(); itemStacks.init(0, true, 20, 47); - itemStacks.set(0, Arrays.asList(recipe.getIngredients().get(0).getMatchingStacks())); + itemStacks.set(0, Arrays.asList(recipe.getIngredients() + .get(0) + .getMatchingStacks())); itemStacks.init(1, false, 139, 47); itemStacks.set(1, recipe.getRecipeOutput()); @@ -50,26 +52,24 @@ public abstract class ProcessingViaFanCategory> extends Cre public void draw(T recipe, double mouseX, double mouseY) { renderWidgets(recipe, mouseX, mouseY); RenderSystem.pushMatrix(); - RenderSystem.translatef(56, 33, 0); RenderSystem.rotatef(-12.5f, 1, 0, 0); RenderSystem.rotatef(22.5f, 0, 1, 0); int scale = 24; - + GuiGameElement.of(AllBlockPartials.ENCASED_FAN_INNER) - .rotateBlock(180, 0, AnimatedKinetics.getCurrentAngle() * 16) - .scale(scale) - .render(); + .rotateBlock(180, 0, AnimatedKinetics.getCurrentAngle() * 16) + .scale(scale) + .render(); GuiGameElement.of(AllBlocks.ENCASED_FAN.getDefault()) - .rotateBlock(0, 180, 0) - .atLocal(0, 0, 0) - .scale(scale) - .render(); - + .rotateBlock(0, 180, 0) + .atLocal(0, 0, 0) + .scale(scale) + .render(); + renderAttachedBlock(); RenderSystem.popMatrix(); - } public abstract void renderAttachedBlock(); diff --git a/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java b/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java index f1c7f5a88..ac6ec1ee8 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java +++ b/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java @@ -8,14 +8,18 @@ import com.mojang.blaze3d.platform.GlStateManager.SourceFactor; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.ColorHelper; +import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.VecHelper; +import com.simibubi.create.foundation.utility.WrappedWorld; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.FireBlock; import net.minecraft.block.FlowingFluidBlock; import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.Atlases; import net.minecraft.client.renderer.BlockRendererDispatcher; import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.RenderHelper; @@ -23,12 +27,17 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderTypeLookup; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.client.world.ClientWorld; import net.minecraft.fluid.Fluid; import net.minecraft.inventory.container.PlayerContainer; import net.minecraft.item.ItemStack; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.AxisDirection; import net.minecraft.util.IItemProvider; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; +import net.minecraft.world.LightType; +import net.minecraft.world.World; import net.minecraftforge.client.model.data.EmptyModelData; public class GuiGameElement { @@ -51,8 +60,8 @@ public class GuiGameElement { public static GuiRenderBuilder of(Fluid fluid) { return new GuiBlockStateRenderBuilder(fluid.getDefaultState() - .getBlockState() - .with(FlowingFluidBlock.LEVEL, 5)); + .getBlockState() + .with(FlowingFluidBlock.LEVEL, 0)); } public static abstract class GuiRenderBuilder { @@ -85,7 +94,7 @@ public class GuiGameElement { public GuiRenderBuilder rotateBlock(double xRot, double yRot, double zRot) { return this.rotate(xRot, yRot, zRot) - .withRotationOffset(VecHelper.getCenterOf(BlockPos.ZERO)); + .withRotationOffset(VecHelper.getCenterOf(BlockPos.ZERO)); } public GuiRenderBuilder scale(double scale) { @@ -154,26 +163,27 @@ public class GuiGameElement { Minecraft mc = Minecraft.getInstance(); BlockRendererDispatcher blockRenderer = mc.getBlockRendererDispatcher(); IRenderTypeBuffer.Impl buffer = mc.getBufferBuilders() - .getEntityVertexConsumers(); - RenderType renderType = RenderTypeLookup.getEntityBlockLayer(blockState); + .getEntityVertexConsumers(); + RenderType renderType = blockState.getBlock() == Blocks.AIR ? Atlases.getEntityTranslucent() + : RenderTypeLookup.getEntityBlockLayer(blockState); IVertexBuilder vb = buffer.getBuffer(renderType); MatrixStack ms = new MatrixStack(); transform(); mc.getTextureManager() - .bindTexture(PlayerContainer.BLOCK_ATLAS_TEXTURE); + .bindTexture(PlayerContainer.BLOCK_ATLAS_TEXTURE); renderModel(blockRenderer, buffer, renderType, vb, ms); cleanUp(); } protected void renderModel(BlockRendererDispatcher blockRenderer, IRenderTypeBuffer.Impl buffer, - RenderType renderType, IVertexBuilder vb, MatrixStack ms) { + RenderType renderType, IVertexBuilder vb, MatrixStack ms) { Vec3d rgb = ColorHelper.getRGB(color); blockRenderer.getBlockModelRenderer() - .renderModel(ms.peek(), vb, blockState, blockmodel, (float) rgb.x, (float) rgb.y, (float) rgb.z, - 0xF000F0, OverlayTexture.DEFAULT_UV, EmptyModelData.INSTANCE); + .renderModel(ms.peek(), vb, blockState, blockmodel, (float) rgb.x, (float) rgb.y, (float) rgb.z, + 0xF000F0, OverlayTexture.DEFAULT_UV, EmptyModelData.INSTANCE); buffer.draw(); } } @@ -182,17 +192,17 @@ public class GuiGameElement { public GuiBlockStateRenderBuilder(BlockState blockstate) { super(Minecraft.getInstance() - .getBlockRendererDispatcher() - .getModelForState(blockstate), blockstate); + .getBlockRendererDispatcher() + .getModelForState(blockstate), blockstate); } @Override protected void renderModel(BlockRendererDispatcher blockRenderer, IRenderTypeBuffer.Impl buffer, - RenderType renderType, IVertexBuilder vb, MatrixStack ms) { + RenderType renderType, IVertexBuilder vb, MatrixStack ms) { if (blockState.getBlock() instanceof FireBlock) { RenderHelper.disableGuiDepthLighting(); blockRenderer.renderBlock(blockState, ms, buffer, 0xF000F0, OverlayTexture.DEFAULT_UV, - EmptyModelData.INSTANCE); + EmptyModelData.INSTANCE); RenderHelper.enable(); buffer.draw(); return; @@ -200,18 +210,38 @@ public class GuiGameElement { super.renderModel(blockRenderer, buffer, renderType, vb, ms); - if (blockState.getFluidState().isEmpty()) + if (blockState.getFluidState() + .isEmpty()) return; - // TODO fluids are not visible for some reason. See fan washing recipes in JEI for an example use case for (RenderType type : RenderType.getBlockLayers()) { if (!RenderTypeLookup.canRenderInLayer(blockState.getFluidState(), type)) continue; - vb = buffer.getBuffer(type); - blockRenderer.renderFluid(new BlockPos(0, 0, 0), Minecraft.getInstance().world, vb, - blockState.getFluidState()); - buffer.draw(type); + RenderSystem.pushMatrix(); + RenderHelper.disableStandardItemLighting(); + + ClientWorld world = Minecraft.getInstance().world; + if (renderWorld == null || renderWorld.getWorld() != world) + renderWorld = new FluidRenderWorld(world); + + for (Direction d : Iterate.directions) { + vb = buffer.getBuffer(type); + if (d.getAxisDirection() == AxisDirection.POSITIVE) + continue; + + RenderSystem.pushMatrix(); + RenderSystem.translated(.5, .5, .5); + RenderSystem.rotatef(AngleHelper.horizontalAngle(d), 0, 1, 0); + RenderSystem.rotatef(AngleHelper.verticalAngle(d) - 90, 0, 0, 1); + RenderSystem.translated(-.5, -.5, -.5); + blockRenderer.renderFluid(new BlockPos(0, 1, 0), renderWorld, vb, blockState.getFluidState()); + buffer.draw(type); + RenderSystem.popMatrix(); + } + + RenderHelper.enable(); + RenderSystem.popMatrix(); break; } } @@ -242,10 +272,30 @@ public class GuiGameElement { prepare(); transform(); Minecraft.getInstance() - .getItemRenderer() - .renderItemIntoGUI(stack, 0, 0); + .getItemRenderer() + .renderItemIntoGUI(stack, 0, 0); cleanUp(); } } + + private static FluidRenderWorld renderWorld; + + private static class FluidRenderWorld extends WrappedWorld { + + public FluidRenderWorld(World world) { + super(world); + } + + @Override + public int getLightLevel(LightType p_226658_1_, BlockPos p_226658_2_) { + return 15; + } + + @Override + public BlockState getBlockState(BlockPos pos) { + return Blocks.AIR.getDefaultState(); + } + + } } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/SymmetryHandler.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/SymmetryHandler.java index 85dcc5fa4..68ed6eba9 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/SymmetryHandler.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/SymmetryHandler.java @@ -3,15 +3,21 @@ package com.simibubi.create.modules.curiosities.symmetry; import java.util.Random; import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; import com.simibubi.create.AllItems; +import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.modules.curiosities.symmetry.mirror.EmptyMirror; import com.simibubi.create.modules.curiosities.symmetry.mirror.SymmetryMirror; +import net.minecraft.block.Blocks; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.Atlases; import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.item.ItemStack; @@ -40,7 +46,8 @@ public class SymmetryHandler { @SubscribeEvent(priority = EventPriority.LOWEST) public static void onBlockPlaced(EntityPlaceEvent event) { - if (event.getWorld().isRemote()) + if (event.getWorld() + .isRemote()) return; if (!(event.getEntity() instanceof PlayerEntity)) return; @@ -48,22 +55,27 @@ public class SymmetryHandler { PlayerEntity player = (PlayerEntity) event.getEntity(); PlayerInventory inv = player.inventory; for (int i = 0; i < PlayerInventory.getHotbarSize(); i++) { - if (!inv.getStackInSlot(i).isEmpty() && inv.getStackInSlot(i).getItem() == AllItems.SYMMETRY_WAND.get()) { + if (!inv.getStackInSlot(i) + .isEmpty() + && inv.getStackInSlot(i) + .getItem() == AllItems.SYMMETRY_WAND.get()) { SymmetryWandItem.apply(player.world, inv.getStackInSlot(i), player, event.getPos(), - event.getPlacedBlock()); + event.getPlacedBlock()); } } } @SubscribeEvent(priority = EventPriority.LOWEST) public static void onBlockDestroyed(BreakEvent event) { - if (event.getWorld().isRemote()) + if (event.getWorld() + .isRemote()) return; PlayerEntity player = event.getPlayer(); PlayerInventory inv = player.inventory; for (int i = 0; i < PlayerInventory.getHotbarSize(); i++) { - if (!inv.getStackInSlot(i).isEmpty() && AllItems.SYMMETRY_WAND.typeOf(inv.getStackInSlot(i))) { + if (!inv.getStackInSlot(i) + .isEmpty() && AllItems.SYMMETRY_WAND.typeOf(inv.getStackInSlot(i))) { SymmetryWandItem.remove(player.world, inv.getStackInSlot(i), player, event.getPos()); } } @@ -77,34 +89,48 @@ public class SymmetryHandler { for (int i = 0; i < PlayerInventory.getHotbarSize(); i++) { ItemStack stackInSlot = player.inventory.getStackInSlot(i); - if (stackInSlot != null && AllItems.SYMMETRY_WAND.typeOf(stackInSlot) - && SymmetryWandItem.isEnabled(stackInSlot)) { - SymmetryMirror mirror = SymmetryWandItem.getMirror(stackInSlot); - if (mirror instanceof EmptyMirror) - continue; + if (!AllItems.SYMMETRY_WAND.typeOf(stackInSlot)) + continue; + if (!SymmetryWandItem.isEnabled(stackInSlot)) + continue; + SymmetryMirror mirror = SymmetryWandItem.getMirror(stackInSlot); + if (mirror instanceof EmptyMirror) + continue; - BlockPos pos = new BlockPos(mirror.getPosition()); + BlockPos pos = new BlockPos(mirror.getPosition()); - float yShift = 0; - double speed = 1 / 16d; - yShift = MathHelper.sin((float) ((tickCounter) * speed)) / 5f; + float yShift = 0; + double speed = 1 / 16d; + yShift = MathHelper.sin((float) (AnimationTickHolder.getRenderTick() * speed)) / 5f; - IRenderTypeBuffer buffer = Minecraft.getInstance().getBufferBuilders().getEntityVertexConsumers(); - ActiveRenderInfo info = mc.gameRenderer.getActiveRenderInfo(); - Vec3d view = info.getProjectedView(); - - MatrixStack ms = event.getMatrixStack(); - ms.push(); - ms.translate(-view.getX(), -view.getY(), -view.getZ()); - ms.translate(pos.getX(), pos.getY(), pos.getZ()); - ms.translate(0, yShift + .2f, 0); - mc.getBlockRendererDispatcher().renderModel(mirror.getModel(), pos, player.world, ms, buffer.getBuffer(Atlases.getEntityTranslucent()), - false, player.world.getRandom(), EmptyModelData.INSTANCE); - - Minecraft.getInstance().getBufferBuilders().getEntityVertexConsumers().draw(Atlases.getEntityTranslucent()); - - ms.pop(); - } + IRenderTypeBuffer buffer = Minecraft.getInstance() + .getBufferBuilders() + .getEntityVertexConsumers(); + ActiveRenderInfo info = mc.gameRenderer.getActiveRenderInfo(); + Vec3d view = info.getProjectedView(); + + MatrixStack ms = event.getMatrixStack(); + ms.push(); + ms.translate(-view.getX(), -view.getY(), -view.getZ()); + ms.translate(pos.getX(), pos.getY(), pos.getZ()); + ms.translate(0, yShift + .2f, 0); + mirror.applyModelTransform(ms); + IBakedModel model = mirror.getModel() + .get(); + IVertexBuilder builder = buffer.getBuffer(RenderType.getTranslucent()); + + mc.getBlockRendererDispatcher() + .getBlockModelRenderer() + .renderModel(player.world, model, Blocks.AIR.getDefaultState(), pos, ms, builder, true, + player.world.getRandom(), MathHelper.getPositionRandom(pos), OverlayTexture.DEFAULT_UV, + EmptyModelData.INSTANCE); + + Minecraft.getInstance() + .getBufferBuilders() + .getEntityVertexConsumers() + .draw(Atlases.getEntityTranslucent()); + + ms.pop(); } } @@ -128,7 +154,7 @@ public class SymmetryHandler { ItemStack stackInSlot = player.inventory.getStackInSlot(i); if (stackInSlot != null && AllItems.SYMMETRY_WAND.typeOf(stackInSlot) - && SymmetryWandItem.isEnabled(stackInSlot)) { + && SymmetryWandItem.isEnabled(stackInSlot)) { SymmetryMirror mirror = SymmetryWandItem.getMirror(stackInSlot); if (mirror instanceof EmptyMirror) @@ -138,7 +164,8 @@ public class SymmetryHandler { double offsetX = (r.nextDouble() - 0.5) * 0.3; double offsetZ = (r.nextDouble() - 0.5) * 0.3; - Vec3d pos = mirror.getPosition().add(0.5 + offsetX, 1 / 4d, 0.5 + offsetZ); + Vec3d pos = mirror.getPosition() + .add(0.5 + offsetX, 1 / 4d, 0.5 + offsetZ); Vec3d speed = new Vec3d(0, r.nextDouble() * 1 / 8f, 0); mc.world.addParticle(ParticleTypes.END_ROD, pos.x, pos.y, pos.z, speed.x, speed.y, speed.z); } @@ -153,7 +180,8 @@ public class SymmetryHandler { Vec3d end = new Vec3d(to).add(0.5, 0.5, 0.5); Vec3d diff = end.subtract(start); - Vec3d step = diff.normalize().scale(density); + Vec3d step = diff.normalize() + .scale(density); int steps = (int) (diff.length() / step.length()); Random r = new Random(); @@ -161,20 +189,19 @@ public class SymmetryHandler { Vec3d pos = start.add(step.scale(i)); Vec3d speed = new Vec3d(0, r.nextDouble() * -40f, 0); - Minecraft.getInstance().world.addParticle( - new RedstoneParticleData(1, 1, 1, 1), - pos.x, pos.y, pos.z, speed.x, speed.y, speed.z); + Minecraft.getInstance().world.addParticle(new RedstoneParticleData(1, 1, 1, 1), pos.x, pos.y, pos.z, + speed.x, speed.y, speed.z); } Vec3d speed = new Vec3d(0, r.nextDouble() * 1 / 32f, 0); Vec3d pos = start.add(step.scale(2)); Minecraft.getInstance().world.addParticle(ParticleTypes.END_ROD, pos.x, pos.y, pos.z, speed.x, speed.y, - speed.z); + speed.z); speed = new Vec3d(0, r.nextDouble() * 1 / 32f, 0); pos = start.add(step.scale(steps)); Minecraft.getInstance().world.addParticle(ParticleTypes.END_ROD, pos.x, pos.y, pos.z, speed.x, speed.y, - speed.z); + speed.z); } } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/SymmetryWandScreen.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/SymmetryWandScreen.java index b3642f588..d9432c4c7 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/SymmetryWandScreen.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/SymmetryWandScreen.java @@ -1,12 +1,11 @@ package com.simibubi.create.modules.curiosities.symmetry; import com.mojang.blaze3d.matrix.MatrixStack; -import com.mojang.blaze3d.platform.GlStateManager.DestFactor; -import com.mojang.blaze3d.platform.GlStateManager.SourceFactor; import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.AllPackets; import com.simibubi.create.ScreenResources; import com.simibubi.create.foundation.gui.AbstractSimiScreen; +import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.gui.widgets.Label; import com.simibubi.create.foundation.gui.widgets.ScrollInput; import com.simibubi.create.foundation.gui.widgets.SelectionScrollInput; @@ -18,18 +17,11 @@ import com.simibubi.create.modules.curiosities.symmetry.mirror.PlaneMirror; import com.simibubi.create.modules.curiosities.symmetry.mirror.SymmetryMirror; import com.simibubi.create.modules.curiosities.symmetry.mirror.TriplePlaneMirror; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.IRenderTypeBuffer; -import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.Vector3f; -import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType; -import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.inventory.container.PlayerContainer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.Hand; import net.minecraft.util.math.Vec3d; -import net.minecraftforge.client.model.data.EmptyModelData; import net.minecraftforge.fml.network.PacketDistributor; public class SymmetryWandScreen extends AbstractSimiScreen { @@ -43,7 +35,6 @@ public class SymmetryWandScreen extends AbstractSimiScreen { private final String orientation = Lang.translate("gui.symmetryWand.orientation"); private SymmetryMirror currentElement; - private float animationProgress; private ItemStack wand; private Hand hand; @@ -56,7 +47,6 @@ public class SymmetryWandScreen extends AbstractSimiScreen { } this.hand = hand; this.wand = wand; - animationProgress = 0; } @Override @@ -117,12 +107,6 @@ public class SymmetryWandScreen extends AbstractSimiScreen { widgets.add(areaAlign); } - @Override - public void tick() { - super.tick(); - animationProgress++; - } - @Override protected void renderWindow(int mouseX, int mouseY, float partialTicks) { ScreenResources.WAND_SYMMETRY.draw(this, guiLeft, guiTop); @@ -133,54 +117,32 @@ public class SymmetryWandScreen extends AbstractSimiScreen { font.drawString(mirrorType, x - 5, y, ScreenResources.FONT_COLOR); font.drawString(orientation, x - 5, y + 20, ScreenResources.FONT_COLOR); - minecraft.getTextureManager() - .bindTexture(PlayerContainer.BLOCK_ATLAS_TEXTURE); - RenderSystem.enableBlend(); - - renderBlock(); renderBlock(); - RenderSystem.pushLightingAttributes(); RenderSystem.pushMatrix(); - - RenderHelper.enable(); - RenderSystem.enableBlend(); - RenderSystem.enableRescaleNormal(); - RenderSystem.enableAlphaTest(); - RenderSystem.alphaFunc(516, 0.1F); - RenderSystem.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA); - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); - - RenderSystem.translated((this.width - this.sWidth) / 2 + 250, this.height / 2 + this.sHeight / 2, 100); - RenderSystem.rotatef(-30, .4f, 0, -.2f); - RenderSystem.rotatef(90 + 0.2f * animationProgress, 0, 1, 0); - RenderSystem.scaled(100, -100, 100); - itemRenderer.renderItem(wand, TransformType.NONE, 0xF000F0, OverlayTexture.DEFAULT_UV, new MatrixStack(), - Minecraft.getInstance() - .getBufferBuilders() - .getEntityVertexConsumers()); - - RenderSystem.disableAlphaTest(); - RenderSystem.disableRescaleNormal(); - RenderSystem.disableLighting(); - + RenderSystem.translated(0, 0, 200); + RenderSystem.rotatef(-20, -3.5f, 1, 1); + GuiGameElement.of(wand) + .at(guiLeft + 220, guiTop + 220) + .scale(4) + .render(); RenderSystem.popMatrix(); - RenderSystem.popAttributes(); } protected void renderBlock() { - MatrixStack ms = new MatrixStack(); - IRenderTypeBuffer buffer = Minecraft.getInstance() - .getBufferBuilders() - .getEntityVertexConsumers(); + RenderSystem.pushMatrix(); - ms.translate(guiLeft + 15, guiTop - 117, 20); + MatrixStack ms = new MatrixStack(); + ms.translate(guiLeft + 18, guiTop + 11, 20); ms.multiply(new Vector3f(.3f, 1f, 0f).getDegreesQuaternion(-22.5f)); ms.scale(32, -32, 32); - ms.translate(0, -5, 0); - minecraft.getBlockRendererDispatcher() - .renderBlock(currentElement.getModel(), ms, buffer, 0xF000F0, OverlayTexture.DEFAULT_UV, - EmptyModelData.INSTANCE); + currentElement.applyModelTransform(ms); + RenderSystem.multMatrix(ms.peek() + .getModel()); + GuiGameElement.of(currentElement.getModel()) + .render(); + + RenderSystem.popMatrix(); } @Override diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/CrossPlaneSymmetryBlock.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/CrossPlaneSymmetryBlock.java deleted file mode 100644 index ee48c3e05..000000000 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/CrossPlaneSymmetryBlock.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.simibubi.create.modules.curiosities.symmetry.block; - -import com.simibubi.create.modules.curiosities.symmetry.mirror.CrossPlaneMirror; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.material.Material; -import net.minecraft.state.EnumProperty; -import net.minecraft.state.StateContainer.Builder; - -public class CrossPlaneSymmetryBlock extends SymmetryBlock { - - public static final EnumProperty align = EnumProperty.create("align", - CrossPlaneMirror.Align.class); - - public CrossPlaneSymmetryBlock() { - super(Properties.create(Material.AIR)); - this.setDefaultState(getDefaultState().with(align, CrossPlaneMirror.Align.Y)); - } - - @Override - protected void fillStateContainer(Builder builder) { - builder.add(align); - super.fillStateContainer(builder); - } - -} diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/PlaneSymmetryBlock.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/PlaneSymmetryBlock.java deleted file mode 100644 index 97295d7aa..000000000 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/PlaneSymmetryBlock.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.simibubi.create.modules.curiosities.symmetry.block; - -import com.simibubi.create.modules.curiosities.symmetry.mirror.PlaneMirror; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.material.Material; -import net.minecraft.state.EnumProperty; -import net.minecraft.state.StateContainer.Builder; - -public class PlaneSymmetryBlock extends SymmetryBlock { - - public static final EnumProperty align = EnumProperty.create("align", PlaneMirror.Align.class); - - public PlaneSymmetryBlock() { - super(Properties.create(Material.AIR)); - this.setDefaultState(getDefaultState().with(align, PlaneMirror.Align.XY)); - } - - @Override - protected void fillStateContainer(Builder builder) { - builder.add(align); - super.fillStateContainer(builder); - } - -} diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/SymmetryBlock.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/SymmetryBlock.java deleted file mode 100644 index d317ec79d..000000000 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/SymmetryBlock.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.simibubi.create.modules.curiosities.symmetry.block; - -import com.simibubi.create.foundation.block.IRenderUtilityBlock; - -import net.minecraft.block.Block; - -public class SymmetryBlock extends Block implements IRenderUtilityBlock { - - public SymmetryBlock(Properties properties) { - super(properties.noDrops()); - } - -} diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/TriplePlaneSymmetryBlock.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/TriplePlaneSymmetryBlock.java deleted file mode 100644 index 4bcefc9b9..000000000 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/block/TriplePlaneSymmetryBlock.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.simibubi.create.modules.curiosities.symmetry.block; - -import net.minecraft.block.material.Material; - -public class TriplePlaneSymmetryBlock extends SymmetryBlock { - - public TriplePlaneSymmetryBlock() { - super(Properties.create(Material.AIR)); - } - - -} diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/CrossPlaneMirror.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/CrossPlaneMirror.java index e5218d133..7906058de 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/CrossPlaneMirror.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/CrossPlaneMirror.java @@ -5,9 +5,10 @@ import java.util.List; import java.util.Map; import com.google.common.collect.ImmutableList; -import com.simibubi.create.AllBlocks; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllBlockPartials; import com.simibubi.create.foundation.utility.Lang; -import com.simibubi.create.modules.curiosities.symmetry.block.CrossPlaneSymmetryBlock; +import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.util.IStringSerializable; @@ -84,9 +85,16 @@ public class CrossPlaneMirror extends SymmetryMirror { } @Override - public BlockState getModel() { - return AllBlocks.SYMMETRY_CROSSPLANE.get().getDefaultState().with(CrossPlaneSymmetryBlock.align, - (Align) orientation); + public AllBlockPartials getModel() { + return AllBlockPartials.SYMMETRY_CROSSPLANE; + } + + @Override + public void applyModelTransform(MatrixStack ms) { + super.applyModelTransform(ms); + ms.translate(.5, .5, .5); + ms.multiply(VecHelper.rotateY(((Align) orientation) == Align.Y ? 0 : 45)); + ms.translate(-.5, -.5, -.5); } @Override diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/EmptyMirror.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/EmptyMirror.java index 400f680af..202afc905 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/EmptyMirror.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/EmptyMirror.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Map; import com.google.common.collect.ImmutableList; +import com.simibubi.create.AllBlockPartials; import net.minecraft.block.BlockState; import net.minecraft.util.IStringSerializable; @@ -48,7 +49,7 @@ public class EmptyMirror extends SymmetryMirror { } @Override - public BlockState getModel() { + public AllBlockPartials getModel() { return null; } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/PlaneMirror.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/PlaneMirror.java index dcd670f95..0bcb9441e 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/PlaneMirror.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/PlaneMirror.java @@ -5,9 +5,10 @@ import java.util.List; import java.util.Map; import com.google.common.collect.ImmutableList; -import com.simibubi.create.AllBlocks; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllBlockPartials; import com.simibubi.create.foundation.utility.Lang; -import com.simibubi.create.modules.curiosities.symmetry.block.PlaneSymmetryBlock; +import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.util.IStringSerializable; @@ -80,8 +81,16 @@ public class PlaneMirror extends SymmetryMirror { } @Override - public BlockState getModel() { - return AllBlocks.SYMMETRY_PLANE.get().getDefaultState().with(PlaneSymmetryBlock.align, (Align) orientation); + public AllBlockPartials getModel() { + return AllBlockPartials.SYMMETRY_PLANE; + } + + @Override + public void applyModelTransform(MatrixStack ms) { + super.applyModelTransform(ms); + ms.translate(.5, .5, .5); + ms.multiply(VecHelper.rotateY(((Align) orientation) == Align.XY ? 0 : 90)); + ms.translate(-.5, -.5, -.5); } @Override diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/SymmetryMirror.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/SymmetryMirror.java index aa8f4aabf..1ee15074e 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/SymmetryMirror.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/SymmetryMirror.java @@ -5,6 +5,8 @@ import java.util.List; import java.util.Map; import com.google.common.collect.ImmutableList; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.simibubi.create.AllBlockPartials; import com.simibubi.create.foundation.utility.Lang; import net.minecraft.block.BlockState; @@ -41,7 +43,7 @@ public abstract class SymmetryMirror { public static List getMirrors() { return ImmutableList.of(Lang.translate("symmetry.mirror.plane"), Lang.translate("symmetry.mirror.doublePlane"), - Lang.translate("symmetry.mirror.triplePlane")); + Lang.translate("symmetry.mirror.triplePlane")); } public IStringSerializable getOrientation() { @@ -77,7 +79,9 @@ public abstract class SymmetryMirror { public abstract String typeName(); - public abstract BlockState getModel(); + public abstract AllBlockPartials getModel(); + + public void applyModelTransform(MatrixStack ms) {} private static final String $ORIENTATION = "direction"; private static final String $POSITION = "pos"; @@ -126,7 +130,8 @@ public abstract class SymmetryMirror { } protected Vec3d getDiff(BlockPos position) { - return this.position.scale(-1).add(position.getX(), position.getY(), position.getZ()); + return this.position.scale(-1) + .add(position.getX(), position.getY(), position.getZ()); } protected BlockPos getIDiff(BlockPos position) { @@ -160,11 +165,13 @@ public abstract class SymmetryMirror { } protected BlockState flipD1(BlockState in) { - return in.rotate(Rotation.COUNTERCLOCKWISE_90).mirror(Mirror.FRONT_BACK); + return in.rotate(Rotation.COUNTERCLOCKWISE_90) + .mirror(Mirror.FRONT_BACK); } protected BlockState flipD2(BlockState in) { - return in.rotate(Rotation.COUNTERCLOCKWISE_90).mirror(Mirror.LEFT_RIGHT); + return in.rotate(Rotation.COUNTERCLOCKWISE_90) + .mirror(Mirror.LEFT_RIGHT); } protected BlockPos flipX(BlockPos position) { @@ -185,13 +192,13 @@ public abstract class SymmetryMirror { protected BlockPos flipD2(BlockPos position) { BlockPos diff = getIDiff(position); return new BlockPos(position.getX() - diff.getX() + diff.getZ(), position.getY(), - position.getZ() - diff.getZ() + diff.getX()); + position.getZ() - diff.getZ() + diff.getX()); } protected BlockPos flipD1(BlockPos position) { BlockPos diff = getIDiff(position); return new BlockPos(position.getX() - diff.getX() - diff.getZ(), position.getY(), - position.getZ() - diff.getZ() - diff.getX()); + position.getZ() - diff.getZ() - diff.getX()); } public void setPosition(Vec3d pos3d) { diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/TriplePlaneMirror.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/TriplePlaneMirror.java index c65b8e379..ffd72190e 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/TriplePlaneMirror.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/TriplePlaneMirror.java @@ -5,7 +5,7 @@ import java.util.List; import java.util.Map; import com.google.common.collect.ImmutableList; -import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllBlockPartials; import com.simibubi.create.foundation.utility.Lang; import net.minecraft.block.BlockState; @@ -42,8 +42,8 @@ public class TriplePlaneMirror extends SymmetryMirror { } @Override - public BlockState getModel() { - return AllBlocks.SYMMETRY_TRIPLEPLANE.get().getDefaultState(); + public AllBlockPartials getModel() { + return AllBlockPartials.SYMMETRY_TRIPLEPLANE; } @Override diff --git a/src/main/resources/assets/create/blockstates/symmetry_crossplane.json b/src/main/resources/assets/create/blockstates/symmetry_crossplane.json deleted file mode 100644 index 9e96d8f55..000000000 --- a/src/main/resources/assets/create/blockstates/symmetry_crossplane.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "forgemarker": 1, - "variants": { - "align=y": { "model": "create:block/symmetry_crossplane"}, - "align=d": { "model": "create:block/symmetry_crossplane_diagonal"} - } -} diff --git a/src/main/resources/assets/create/blockstates/symmetry_plane.json b/src/main/resources/assets/create/blockstates/symmetry_plane.json deleted file mode 100644 index ffff56c62..000000000 --- a/src/main/resources/assets/create/blockstates/symmetry_plane.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variants": { - "align=xy": { "model": "create:block/symmetry_plane" }, - "align=yz": { "model": "create:block/symmetry_plane", "y": 90 } - } -} diff --git a/src/main/resources/assets/create/blockstates/symmetry_tripleplane.json b/src/main/resources/assets/create/blockstates/symmetry_tripleplane.json deleted file mode 100644 index 8b24d5ea5..000000000 --- a/src/main/resources/assets/create/blockstates/symmetry_tripleplane.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variants": { - "": { "model": "create:block/symmetry_tripleplane" } - } -} diff --git a/src/main/resources/assets/create/models/block/symmetry_crossplane_diagonal.json b/src/main/resources/assets/create/models/block/symmetry_crossplane_diagonal.json deleted file mode 100644 index dc89290e8..000000000 --- a/src/main/resources/assets/create/models/block/symmetry_crossplane_diagonal.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", - "textures": { - "0": "block/white_stained_glass", - "1": "block/obsidian", - "2": "block/packed_ice" - }, - "elements": [ - { - "name": "Mirror", - "from": [ 4.0, 1.0, 7.500000007450581 ], - "to": [ 7.0, 12.0, 8.50000000745058 ], - "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 45.0 }, - "faces": { - "north": { "texture": "#0", "uv": [ 4.0, 1.0, 7.0, 12.0 ] }, - "east": { "texture": "#0", "uv": [ 3.0, 1.0, 4.0, 12.0 ] }, - "south": { "texture": "#0", "uv": [ 4.0, 1.0, 7.0, 12.0 ] }, - "west": { "texture": "#0", "uv": [ 12.0, 1.0, 13.0, 12.0 ] }, - "up": { "texture": "#0", "uv": [ 4.0, 1.0, 7.0, 2.0 ] }, - "down": { "texture": "#0", "uv": [ 4.0, 14.0, 7.0, 15.0 ] } - } - }, - { - "name": "rod_left_bottom", - "from": [ 1.2000000029802322, 3.0, 7.0 ], - "to": [ 3.2000000029802322, 4.0, 9.0 ], - "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 22.5 }, - "faces": { - "north": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "east": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "south": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "west": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "up": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, - "down": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 2.0 ] } - } - }, - { - "name": "rod_left_top", - "from": [ 1.2000000029802322, 12.0, 7.0 ], - "to": [ 3.2000000029802322, 13.0, 9.0 ], - "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 22.5 }, - "faces": { - "north": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "east": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "south": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "west": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "up": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, - "down": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 2.0 ] } - } - }, - { - "name": "rod_left", - "from": [ 2.0, 4.0, 7.499999992549419 ], - "to": [ 3.0, 12.0, 8.49999999254942 ], - "shade": false, - "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 22.5 }, - "faces": { - "north": { "texture": "#2", "uv": [ 3.0, 1.0, 4.0, 9.0 ] }, - "east": { "texture": "#2", "uv": [ 3.0, 0.0, 4.0, 8.0 ] }, - "south": { "texture": "#2", "uv": [ 3.0, 1.0, 4.0, 9.0 ] }, - "west": { "texture": "#2", "uv": [ 5.0, 1.0, 6.0, 9.0 ] } - } - }, - { - "name": "rod_right_bottom", - "from": [ 12.799999997019768, 3.0, 7.0 ], - "to": [ 14.799999997019768, 4.0, 9.0 ], - "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 22.5 }, - "faces": { - "north": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "east": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "south": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "west": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "up": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, - "down": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 2.0 ] } - } - }, - { - "name": "rod_right", - "from": [ 13.0, 4.0, 7.499999992549419 ], - "to": [ 14.0, 12.0, 8.49999999254942 ], - "shade": false, - "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 22.5 }, - "faces": { - "north": { "texture": "#2", "uv": [ 3.0, 2.0, 4.0, 10.0 ] }, - "east": { "texture": "#2", "uv": [ 3.0, 3.0, 4.0, 11.0 ] }, - "south": { "texture": "#2", "uv": [ 4.0, 3.0, 5.0, 11.0 ] }, - "west": { "texture": "#2", "uv": [ 5.0, 0.0, 6.0, 8.0 ] } - } - }, - { - "name": "rod_right_top", - "from": [ 12.799999997019768, 12.0, 7.0 ], - "to": [ 14.799999997019768, 13.0, 9.0 ], - "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 22.5 }, - "faces": { - "north": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "east": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "south": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "west": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, - "up": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, - "down": { "texture": "#1", "uv": [ 0.0, 0.0, 2.0, 2.0 ] } - } - }, - { - "name": "CrossMirror", - "from": [ 7.499999992549419, 4.0, 9.50000000745058 ], - "to": [ 8.49999999254942, 15.0, 12.50000000745058 ], - "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 45.0 }, - "faces": { - "north": { "texture": "#0", "uv": [ 4.0, 1.0, 5.0, 12.0 ] }, - "east": { "texture": "#0", "uv": [ 3.0, 1.0, 6.0, 12.0 ] }, - "south": { "texture": "#0", "uv": [ 4.0, 1.0, 5.0, 12.0 ] }, - "west": { "texture": "#0", "uv": [ 9.0, 1.0, 12.0, 12.0 ] }, - "up": { "texture": "#0", "uv": [ 3.0, 3.0, 4.0, 6.0 ] }, - "down": { "texture": "#0", "uv": [ 5.0, 9.0, 6.0, 12.0 ] } - } - }, - { - "name": "Mirror II", - "from": [ 9.0, 3.0, 7.500000007450581 ], - "to": [ 12.0, 14.0, 8.50000000745058 ], - "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 45.0 }, - "faces": { - "north": { "texture": "#0", "uv": [ 4.0, 1.0, 7.0, 12.0 ] }, - "east": { "texture": "#0", "uv": [ 3.0, 1.0, 4.0, 12.0 ] }, - "south": { "texture": "#0", "uv": [ 4.0, 1.0, 7.0, 12.0 ] }, - "west": { "texture": "#0", "uv": [ 12.0, 1.0, 13.0, 12.0 ] }, - "up": { "texture": "#0", "uv": [ 4.0, 1.0, 7.0, 2.0 ] }, - "down": { "texture": "#0", "uv": [ 4.0, 14.0, 7.0, 15.0 ] } - } - }, - { - "name": "CrossMirror II", - "from": [ 7.499999992549419, 2.0, 3.5000000074505806 ], - "to": [ 8.49999999254942, 13.0, 6.500000007450581 ], - "rotation": { "origin": [ 8.0, 8.0, 8.0 ], "axis": "y", "angle": 45.0 }, - "faces": { - "north": { "texture": "#0", "uv": [ 4.0, 1.0, 5.0, 12.0 ] }, - "east": { "texture": "#0", "uv": [ 3.0, 1.0, 6.0, 12.0 ] }, - "south": { "texture": "#0", "uv": [ 4.0, 3.0, 5.0, 14.0 ] }, - "west": { "texture": "#0", "uv": [ 9.0, 2.0, 12.0, 13.0 ] }, - "up": { "texture": "#0", "uv": [ 4.0, 3.0, 5.0, 6.0 ] }, - "down": { "texture": "#0", "uv": [ 4.0, 8.0, 5.0, 11.0 ] } - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/symmetry_crossplane.json b/src/main/resources/assets/create/models/block/symmetry_effect/crossplane.json similarity index 100% rename from src/main/resources/assets/create/models/block/symmetry_crossplane.json rename to src/main/resources/assets/create/models/block/symmetry_effect/crossplane.json diff --git a/src/main/resources/assets/create/models/block/symmetry_plane.json b/src/main/resources/assets/create/models/block/symmetry_effect/plane.json similarity index 100% rename from src/main/resources/assets/create/models/block/symmetry_plane.json rename to src/main/resources/assets/create/models/block/symmetry_effect/plane.json diff --git a/src/main/resources/assets/create/models/block/symmetry_tripleplane.json b/src/main/resources/assets/create/models/block/symmetry_effect/tripleplane.json similarity index 100% rename from src/main/resources/assets/create/models/block/symmetry_tripleplane.json rename to src/main/resources/assets/create/models/block/symmetry_effect/tripleplane.json diff --git a/src/main/resources/assets/create/textures/gui/wand_symmetry.png b/src/main/resources/assets/create/textures/gui/wand_symmetry.png index fb8b7e3e58a090a6863b23d130f4d6fce30c0eb9..49405bd245515ac8a17ebec7576452117137d4d2 100644 GIT binary patch literal 1781 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5D>38$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&di49pAxJ|V6^acjq*(9qEE_^PbR72PwBY~Fk0*s){(|NjR{je^k-7~Uc9 zbbgWvDA$w(`2_>h{7422!Qa_cfw9e5;1OBOz`(Z`gc;p`Pgu*qz*OYv;uum9_x5(6 zzi^@m+rw>HAOHV<*k$0NH|xURZOgu#@!3?lm*HgPBewji8JAKw9)9?}!EbpigT8+} z!)^vY;aiLbD(`OId01pIzdrZ%j<3@H%8x((^p}xEfPuk2|JC2;XIUzKuilqocA#H> zxAuYi^?udzTn{)I*UjDhX^*JGdIyF%oA<^wGE}iLRj?e`S{ycSJJSnMj)vlG-z^%f z#T*zI3(kFGn!#8QCsrYIU~7DK^!)yF&r=&E8LV04SPS0HnfiQjYNIB@X(s2m#_M9N z&lq&LdMa7tqJ?I#6vX`GzqlYg;pIO^hV1X>D_O)`a zuD^@_fb8wU|LP61tNvHs=LgEwGe~nOF#P)v%ay=?V9Jj4;@Y$o{byJXEYF*_Tb9B3 z(Y&*|^^d18C2VCqkj33_Rg7V^E<;!}!018T!xJHx&=ckpFCl;kL6eMQmmFVTAmMEC$ z8R{ALs{Bo7U|?F}>Eakt5%+fX!8|EPkpm6Wp8elHW71JiX-?CdH`j6`OZU!k-t=PT z#b7;|w1-9~9)2)lTz+{O!~S{mm~yxZW;OCMsx?-I74MKa_k8|qi*EFIm5ALP^`}juU z!LJRm=MEX)Yp6clGpDu8!Fqx00gKm}>|2;`F}`hZzXKP4@U!f|I-BRbHzq#6!)Sep zH-r5}{(;IJ2OgIl__U|@dGBWsJMX~W#%uG+k8#^%vB$`7J6)N)&2|k zZZNLr5u1_1zQ-smVVdlRQvr>cWe27{K4I_j`Ax&dpX#?5lRux|%*^(Dej0nvIs4Om z67%XO$r{-GZ)cca{CjCF)0-1*KmT)mP|bV){Vx;G`Tyz%xPU&c`=KY2;N1|JFz@P@ zxeNCh1vBg`{d^~f!+`V5=2;Kz=d>~<=&~M&;%e9`!jP@Wa4m>o%~FO4Z^jMNMkR0r e$rDDs>GwZQU3~a=tmaiv$>!