From 79b655947ec2ae5320cf6daebce029a5dafd1304 Mon Sep 17 00:00:00 2001 From: Maxx <53229958+MBatt1@users.noreply.github.com> Date: Tue, 5 Nov 2024 21:58:20 -0600 Subject: [PATCH] #788 levita rail --- .../blocks/ParadiseLostBlocks.java | 1 + .../blocks/mechanical/LevitaRailBlock.java | 50 ++++++++++++ .../particle/LevitaBloopParticle.java | 77 ++++++++++++++++++ .../particle/ParadiseLostParticles.java | 3 + .../component/FloatingComponent.java | 45 ++++++++++ .../component/ParadiseLostComponents.java | 3 + .../items/ParadiseLostItemGroups.java | 1 + .../paradiselost/items/ParadiseLostItems.java | 1 + .../entity/AbstractMinecartEntityMixin.java | 58 +++++++++++++ .../mixin/entity/EntityMixin.java | 27 ------ .../blockstates/levita_rail.json | 46 +++++++++++ .../assets/paradise_lost/lang/en_us.json | 1 + .../models/block/levita_rail.json | 6 ++ .../models/block/levita_rail_on.json | 6 ++ .../block/levita_rail_on_raised_ne.json | 6 ++ .../block/levita_rail_on_raised_sw.json | 6 ++ .../models/block/levita_rail_raised_ne.json | 6 ++ .../models/block/levita_rail_raised_sw.json | 6 ++ .../models/item/levita_rail.json | 6 ++ .../paradise_lost/particles/levita_bloop.json | 5 ++ .../textures/block/levita_rail.png | Bin 0 -> 540 bytes .../textures/block/levita_rail_on.png | Bin 0 -> 547 bytes .../textures/item/golden_amber.png | Bin 281 -> 278 bytes .../paradise_lost/textures/item/olvite.png | Bin 429 -> 429 bytes .../textures/particle/colored_splash_0.png | Bin 79 -> 0 bytes .../textures/particle/colored_splash_1.png | Bin 75 -> 0 bytes .../textures/particle/colored_splash_2.png | Bin 72 -> 0 bytes .../textures/particle/colored_splash_3.png | Bin 75 -> 0 bytes .../textures/particle/levita_boop.png | Bin 0 -> 101 bytes .../data/minecraft/tags/block/rails.json | 5 ++ .../loot_table/blocks/levita_rail.json | 21 +++++ .../paradise_lost/recipe/levita_rail.json | 23 ++++++ .../tags/item/iron_interchangable.json | 7 ++ src/main/resources/fabric.mod.json | 3 +- src/main/resources/paradise_lost.mixins.json | 2 +- 35 files changed, 391 insertions(+), 30 deletions(-) create mode 100644 src/main/java/net/id/paradiselost/blocks/mechanical/LevitaRailBlock.java create mode 100644 src/main/java/net/id/paradiselost/client/rendering/particle/LevitaBloopParticle.java create mode 100644 src/main/java/net/id/paradiselost/component/FloatingComponent.java create mode 100644 src/main/java/net/id/paradiselost/mixin/entity/AbstractMinecartEntityMixin.java delete mode 100644 src/main/java/net/id/paradiselost/mixin/entity/EntityMixin.java create mode 100644 src/main/resources/assets/paradise_lost/blockstates/levita_rail.json create mode 100644 src/main/resources/assets/paradise_lost/models/block/levita_rail.json create mode 100644 src/main/resources/assets/paradise_lost/models/block/levita_rail_on.json create mode 100644 src/main/resources/assets/paradise_lost/models/block/levita_rail_on_raised_ne.json create mode 100644 src/main/resources/assets/paradise_lost/models/block/levita_rail_on_raised_sw.json create mode 100644 src/main/resources/assets/paradise_lost/models/block/levita_rail_raised_ne.json create mode 100644 src/main/resources/assets/paradise_lost/models/block/levita_rail_raised_sw.json create mode 100644 src/main/resources/assets/paradise_lost/models/item/levita_rail.json create mode 100644 src/main/resources/assets/paradise_lost/particles/levita_bloop.json create mode 100644 src/main/resources/assets/paradise_lost/textures/block/levita_rail.png create mode 100644 src/main/resources/assets/paradise_lost/textures/block/levita_rail_on.png delete mode 100644 src/main/resources/assets/paradise_lost/textures/particle/colored_splash_0.png delete mode 100644 src/main/resources/assets/paradise_lost/textures/particle/colored_splash_1.png delete mode 100644 src/main/resources/assets/paradise_lost/textures/particle/colored_splash_2.png delete mode 100644 src/main/resources/assets/paradise_lost/textures/particle/colored_splash_3.png create mode 100644 src/main/resources/assets/paradise_lost/textures/particle/levita_boop.png create mode 100644 src/main/resources/data/minecraft/tags/block/rails.json create mode 100644 src/main/resources/data/paradise_lost/loot_table/blocks/levita_rail.json create mode 100644 src/main/resources/data/paradise_lost/recipe/levita_rail.json create mode 100644 src/main/resources/data/paradise_lost/tags/item/iron_interchangable.json diff --git a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java index 5ef80b362..0597d917f 100644 --- a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java +++ b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java @@ -284,6 +284,7 @@ private static Settings cherineTorch() { public static final FoodBowlBlock FOOD_BOWL = add("food_bowl", new FoodBowlBlock(create().mapColor(MapColor.DULL_RED).strength(2.5f).sounds(BlockSoundGroup.WOOD).nonOpaque()), cutoutMippedRenderLayer); public static final Block TREE_TAP = add("tree_tap", new TreeTapBlock(create().mapColor(MapColor.SPRUCE_BROWN).strength(2.5f).sounds(BlockSoundGroup.WOOD).nonOpaque().ticksRandomly()), cutoutRenderLayer); public static final NitraBlock NITRA_BUNCH = add("nitra_bunch", new NitraBlock(create().mapColor(MapColor.PALE_YELLOW).strength(0.5f).sounds(BlockSoundGroup.WET_GRASS))); + public static final Block LEVITA_RAIL = add("levita_rail", new LevitaRailBlock(create().noCollision().strength(0.7F).sounds(BlockSoundGroup.METAL)), cutoutMippedRenderLayer); public static void init() { } diff --git a/src/main/java/net/id/paradiselost/blocks/mechanical/LevitaRailBlock.java b/src/main/java/net/id/paradiselost/blocks/mechanical/LevitaRailBlock.java new file mode 100644 index 000000000..07356c38f --- /dev/null +++ b/src/main/java/net/id/paradiselost/blocks/mechanical/LevitaRailBlock.java @@ -0,0 +1,50 @@ +package net.id.paradiselost.blocks.mechanical; + +import net.id.paradiselost.component.ParadiseLostComponents; +import net.id.paradiselost.entities.ParadiseLostEntityExtensions; +import net.minecraft.block.AbstractBlock; +import net.minecraft.block.BlockState; +import net.minecraft.block.PoweredRailBlock; +import net.minecraft.entity.Entity; +import net.minecraft.entity.vehicle.AbstractMinecartEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Box; +import net.minecraft.world.World; + +import java.util.List; +import java.util.function.Predicate; + +public class LevitaRailBlock extends PoweredRailBlock { + + public LevitaRailBlock(AbstractBlock.Settings settings) { + super(settings); + } + + @Override + protected void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) { + if (!world.isClient) { + List list = this.getCarts(world, pos, AbstractMinecartEntity.class, e -> true); + for (AbstractMinecartEntity cart : list) { + var floatingComponent = ParadiseLostComponents.FLOATING_KEY.get(cart); + floatingComponent.startFloating(); + ParadiseLostComponents.FLOATING_KEY.sync(cart); + } + } + } + + private List getCarts(World world, BlockPos pos, Class entityClass, Predicate entityPredicate) { + return world.getEntitiesByClass(entityClass, this.getCartDetectionBox(pos), entityPredicate); + } + + private Box getCartDetectionBox(BlockPos pos) { + double radius = 0.4; + return new Box( + pos.getX() + radius, + pos.getY(), + pos.getZ() + radius, + pos.getX() + 1 - radius, + pos.getY() + 1 - radius, + pos.getZ() + 1 - radius + ); + } +} diff --git a/src/main/java/net/id/paradiselost/client/rendering/particle/LevitaBloopParticle.java b/src/main/java/net/id/paradiselost/client/rendering/particle/LevitaBloopParticle.java new file mode 100644 index 000000000..3285b36b0 --- /dev/null +++ b/src/main/java/net/id/paradiselost/client/rendering/particle/LevitaBloopParticle.java @@ -0,0 +1,77 @@ +package net.id.paradiselost.client.rendering.particle; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.particle.Particle; +import net.minecraft.client.particle.ParticleFactory; +import net.minecraft.client.particle.ParticleTextureSheet; +import net.minecraft.client.particle.SpriteBillboardParticle; +import net.minecraft.client.particle.SpriteProvider; +import net.minecraft.client.particle.SuspendParticle; +import net.minecraft.client.world.ClientWorld; +import net.minecraft.particle.SimpleParticleType; + +/* + * Basically just a SuspendParticle, but that particle isn't public :I + * These are bigger than normal suspend particles though + */ +public class LevitaBloopParticle extends SpriteBillboardParticle { + + LevitaBloopParticle(ClientWorld clientWorld, double d, double e, double f, double g, double h, double i) { + super(clientWorld, d, e, f, g, h, i); + float j = this.random.nextFloat() * 0.1F + 0.2F; + this.red = j; + this.green = j; + this.blue = j; + this.setBoundingBoxSpacing(0.02F, 0.02F); + this.scale = this.scale * (this.random.nextFloat() * 0.7F + 1.1F); + this.velocityX *= 0.02F; + this.velocityY *= 0.02F; + this.velocityZ *= 0.02F; + this.maxAge = (int)(20.0 / (Math.random() * 0.8 + 0.2)); + } + + @Override + public ParticleTextureSheet getType() { + return ParticleTextureSheet.PARTICLE_SHEET_OPAQUE; + } + + @Override + public void move(double dx, double dy, double dz) { + this.setBoundingBox(this.getBoundingBox().offset(dx, dy, dz)); + this.repositionFromBoundingBox(); + } + + @Override + public void tick() { + this.prevPosX = this.x; + this.prevPosY = this.y; + this.prevPosZ = this.z; + if (this.maxAge-- <= 0) { + this.markDead(); + } else { + this.move(this.velocityX, this.velocityY, this.velocityZ); + this.velocityX *= 0.99; + this.velocityY *= 0.99; + this.velocityZ *= 0.99; + } + } + + @Environment(EnvType.CLIENT) + public static class DefaultFactory implements ParticleFactory { + private final SpriteProvider spriteProvider; + + public DefaultFactory(SpriteProvider spriteProvider) { + this.spriteProvider = spriteProvider; + } + + public Particle createParticle(SimpleParticleType simpleParticleType, ClientWorld clientWorld, double d, double e, double f, double g, double h, double i) { + LevitaBloopParticle suspendParticle = new LevitaBloopParticle(clientWorld, d, e, f, g, h, i); + suspendParticle.setColor(0.5F, 0.45F, 1.0F); + suspendParticle.setSprite(this.spriteProvider); + suspendParticle.setAlpha(1.0F - clientWorld.random.nextFloat() * 0.7F); + suspendParticle.setMaxAge(suspendParticle.getMaxAge() / 2); + return suspendParticle; + } + } +} diff --git a/src/main/java/net/id/paradiselost/client/rendering/particle/ParadiseLostParticles.java b/src/main/java/net/id/paradiselost/client/rendering/particle/ParadiseLostParticles.java index 52f8fd212..3dacc069c 100644 --- a/src/main/java/net/id/paradiselost/client/rendering/particle/ParadiseLostParticles.java +++ b/src/main/java/net/id/paradiselost/client/rendering/particle/ParadiseLostParticles.java @@ -8,6 +8,7 @@ import net.id.paradiselost.ParadiseLost; import net.minecraft.particle.ParticleEffect; import net.minecraft.particle.ParticleType; +import net.minecraft.particle.ParticleTypes; import net.minecraft.particle.SimpleParticleType; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; @@ -23,6 +24,7 @@ public class ParadiseLostParticles { public static SimpleParticleType MOTHER_AUREL_LEAF = register("golden_leaf"); public static SimpleParticleType FALLING_ORANGE_PETAL = register("falling_orange_petal"); public static SimpleParticleType CHERINE_FLAME = register("cherine_flame"); + public static SimpleParticleType LEVITA_BLOOP = register("levita_bloop"); /** * Registers a simple particle type. @@ -52,6 +54,7 @@ public static void init() { register(MOTHER_AUREL_LEAF, MotherAurelLeafParticle.DefaultFactory::new); register(FALLING_ORANGE_PETAL, FallingOrangePetalParticle.DefaultFactory::new); register(CHERINE_FLAME, CherineFlameParticle.DefaultFactory::new); + register(LEVITA_BLOOP, LevitaBloopParticle.DefaultFactory::new); } /** diff --git a/src/main/java/net/id/paradiselost/component/FloatingComponent.java b/src/main/java/net/id/paradiselost/component/FloatingComponent.java new file mode 100644 index 000000000..01dc4befa --- /dev/null +++ b/src/main/java/net/id/paradiselost/component/FloatingComponent.java @@ -0,0 +1,45 @@ +package net.id.paradiselost.component; + +import net.minecraft.nbt.NbtCompound; +import net.minecraft.registry.RegistryWrapper; +import org.ladysnake.cca.api.v3.component.sync.AutoSyncedComponent; + +public class FloatingComponent implements AutoSyncedComponent { + + private static final int FLOAT_SECONDS = 4; + private boolean floating = false; + private int floatTime = 0; + + @Override + public void readFromNbt(NbtCompound tag, RegistryWrapper.WrapperLookup registryLookup) { + floating = tag.getBoolean("floating"); + floatTime = tag.getInt("floatTime"); + } + + @Override + public void writeToNbt(NbtCompound tag, RegistryWrapper.WrapperLookup registryLookup) { + tag.putBoolean("floating", floating); + tag.putInt("floatTime", floatTime); + } + + public boolean getFloating() { + return floating; + } + + public int getFloatTime() { + return floatTime; + } + + public void startFloating() { + floating = true; + floatTime = 20 * FLOAT_SECONDS; + } + + public void tick() { + floatTime--; + if (floatTime == 0) { + floating = false; + } + } + +} diff --git a/src/main/java/net/id/paradiselost/component/ParadiseLostComponents.java b/src/main/java/net/id/paradiselost/component/ParadiseLostComponents.java index 64220eb40..479f386fb 100644 --- a/src/main/java/net/id/paradiselost/component/ParadiseLostComponents.java +++ b/src/main/java/net/id/paradiselost/component/ParadiseLostComponents.java @@ -2,6 +2,7 @@ import net.id.paradiselost.ParadiseLost; import net.id.paradiselost.entities.passive.moa.MoaEntity; +import net.minecraft.entity.vehicle.AbstractMinecartEntity; import org.ladysnake.cca.api.v3.component.ComponentKey; import org.ladysnake.cca.api.v3.component.ComponentRegistry; import org.ladysnake.cca.api.v3.entity.EntityComponentFactoryRegistry; @@ -10,9 +11,11 @@ public class ParadiseLostComponents implements EntityComponentInitializer { public static final ComponentKey MOA_GENETICS_KEY = ComponentRegistry.getOrCreate(ParadiseLost.locate("moa_genetics"), MoaGenes.class); + public static final ComponentKey FLOATING_KEY = ComponentRegistry.getOrCreate(ParadiseLost.locate("minecart_float"), FloatingComponent.class); @Override public void registerEntityComponentFactories(EntityComponentFactoryRegistry registry) { registry.registerFor(MoaEntity.class, MOA_GENETICS_KEY, moa -> new MoaGenes()); + registry.registerFor(AbstractMinecartEntity.class, FLOATING_KEY, cart -> new FloatingComponent()); } } diff --git a/src/main/java/net/id/paradiselost/items/ParadiseLostItemGroups.java b/src/main/java/net/id/paradiselost/items/ParadiseLostItemGroups.java index 87a46386f..a1b4ff9e3 100644 --- a/src/main/java/net/id/paradiselost/items/ParadiseLostItemGroups.java +++ b/src/main/java/net/id/paradiselost/items/ParadiseLostItemGroups.java @@ -215,6 +215,7 @@ public class ParadiseLostItemGroups { entries.add(AMADRYS_BUNDLE); entries.add(NITRA_BUNCH); entries.add(LEVITATOR); + entries.add(LEVITA_RAIL); entries.add(INCUBATOR); entries.add(FOOD_BOWL); entries.add(TREE_TAP); diff --git a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java index 955c528c7..b905ef5bf 100644 --- a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java +++ b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java @@ -199,6 +199,7 @@ private static Settings food(FoodComponent foodComponent) { public static final BlockItem FOOD_BOWL = add(ParadiseLostBlocks.FOOD_BOWL, fuel(300)); public static final BlockItem TREE_TAP = add(ParadiseLostBlocks.TREE_TAP, fuel(300)); public static final BlockItem NITRA_BUNCH = add(ParadiseLostBlocks.NITRA_BUNCH, fuel(3200)); + public static final BlockItem LEVITA_RAIL = add(ParadiseLostBlocks.LEVITA_RAIL); public static final AurelBucketItem AUREL_BUCKET = add("aurel_bucket", new AurelBucketItem(new Settings().maxCount(16)), fuel(200), emptyBucketBehavior); diff --git a/src/main/java/net/id/paradiselost/mixin/entity/AbstractMinecartEntityMixin.java b/src/main/java/net/id/paradiselost/mixin/entity/AbstractMinecartEntityMixin.java new file mode 100644 index 000000000..125228a6a --- /dev/null +++ b/src/main/java/net/id/paradiselost/mixin/entity/AbstractMinecartEntityMixin.java @@ -0,0 +1,58 @@ +package net.id.paradiselost.mixin.entity; + +import net.id.paradiselost.client.rendering.particle.ParadiseLostParticles; +import net.id.paradiselost.component.ParadiseLostComponents; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.MovementType; +import net.minecraft.entity.vehicle.AbstractMinecartEntity; +import net.minecraft.entity.vehicle.VehicleEntity; +import net.minecraft.particle.ParticleTypes; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.World; +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; + +@Mixin(AbstractMinecartEntity.class) +public abstract class AbstractMinecartEntityMixin extends VehicleEntity { + + public AbstractMinecartEntityMixin(EntityType entityType, World world) { + super(entityType, world); + } + + @Shadow + private boolean onRail; + + @Shadow + protected abstract double getMaxSpeed(); + + @Inject(method = "moveOffRail", at = @At("HEAD"), cancellable = true) + protected void moveOffRail(CallbackInfo ci) { + var floatingComponent = ParadiseLostComponents.FLOATING_KEY.get(this); + if (!this.isOnGround() && floatingComponent.getFloating() && floatingComponent.getFloatTime() > 0) { + double d = this.getMaxSpeed(); + Vec3d vec3d = this.getVelocity(); + this.setVelocity(MathHelper.clamp(vec3d.x, -d, d), 0, MathHelper.clamp(vec3d.z, -d, d)); + this.move(MovementType.SELF, this.getVelocity()); + // decrement + floatingComponent.tick(); + ParadiseLostComponents.FLOATING_KEY.sync(this); + ci.cancel(); + } + } + + @Inject(method = "tick", at = @At("HEAD")) + public void tick(CallbackInfo ci) { + var floatingComponent = ParadiseLostComponents.FLOATING_KEY.get(this); + if (this.getWorld().isClient && !this.onRail && floatingComponent.getFloating()) { + var pos = this.getPos(); + var rightParticlePos = pos.add(this.getVelocity().normalize().multiply(0.35F).rotateY(1.57F)); + var leftParticlePos = pos.add(this.getVelocity().normalize().multiply(0.35F).rotateY(-1.57F)); + this.getWorld().addParticle(ParadiseLostParticles.LEVITA_BLOOP, rightParticlePos.getX(), this.getY(), rightParticlePos.getZ(), 0, 0, 0); + this.getWorld().addParticle(ParadiseLostParticles.LEVITA_BLOOP, leftParticlePos.getX(), this.getY(), leftParticlePos.getZ(), 0, 0, 0); + } + } +} diff --git a/src/main/java/net/id/paradiselost/mixin/entity/EntityMixin.java b/src/main/java/net/id/paradiselost/mixin/entity/EntityMixin.java deleted file mode 100644 index f1badd8fc..000000000 --- a/src/main/java/net/id/paradiselost/mixin/entity/EntityMixin.java +++ /dev/null @@ -1,27 +0,0 @@ -package net.id.paradiselost.mixin.entity; - -import net.minecraft.entity.Entity; -import org.spongepowered.asm.mixin.Mixin; - -@Mixin(Entity.class) -public abstract class EntityMixin { -// @Redirect(method = "getVelocityMultiplier", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/Block;getVelocityMultiplier()F"), require = 2) -// private float getVelocityMultiplier(Block target) { -// TODO: reimplement if we re-add slippery blocks -// if (target == ParadiseLostBlocks.QUICKSOIL || target == ParadiseLostBlocks.QUICKSOIL_GLASS || target == ParadiseLostBlocks.QUICKSOIL_GLASS_PANE) { -// Entity entity = ((Entity) (Object) this); -// boolean isVehicle = entity instanceof BoatEntity || entity instanceof MinecartEntity; -// -// double maxSpeed = entity.world.getGameRules().get(ParadiseLostGameRules.MAX_QUICKSOIL_SPEED).get(); -// maxSpeed = isVehicle ? maxSpeed * 0.16D : maxSpeed; -// float calculatedChange = (float) ((maxSpeed - entity.getVelocity().horizontalLength()) / maxSpeed * 0.102); -// -// if (isVehicle) { -// return Math.min(1.0F, 1.0F + calculatedChange); -// } else { -// return (1 + Math.max(calculatedChange, 0)); -// } -// } -// return target.getVelocityMultiplier(); -// } -} diff --git a/src/main/resources/assets/paradise_lost/blockstates/levita_rail.json b/src/main/resources/assets/paradise_lost/blockstates/levita_rail.json new file mode 100644 index 000000000..34a15b07c --- /dev/null +++ b/src/main/resources/assets/paradise_lost/blockstates/levita_rail.json @@ -0,0 +1,46 @@ +{ + "variants": { + "powered=false,shape=ascending_east": { + "model": "paradise_lost:block/levita_rail_raised_ne", + "y": 90 + }, + "powered=false,shape=ascending_north": { + "model": "paradise_lost:block/levita_rail_raised_ne" + }, + "powered=false,shape=ascending_south": { + "model": "paradise_lost:block/levita_rail_raised_sw" + }, + "powered=false,shape=ascending_west": { + "model": "paradise_lost:block/levita_rail_raised_sw", + "y": 90 + }, + "powered=false,shape=east_west": { + "model": "paradise_lost:block/levita_rail", + "y": 90 + }, + "powered=false,shape=north_south": { + "model": "paradise_lost:block/levita_rail" + }, + "powered=true,shape=ascending_east": { + "model": "paradise_lost:block/levita_rail_on_raised_ne", + "y": 90 + }, + "powered=true,shape=ascending_north": { + "model": "paradise_lost:block/levita_rail_on_raised_ne" + }, + "powered=true,shape=ascending_south": { + "model": "paradise_lost:block/levita_rail_on_raised_sw" + }, + "powered=true,shape=ascending_west": { + "model": "paradise_lost:block/levita_rail_on_raised_sw", + "y": 90 + }, + "powered=true,shape=east_west": { + "model": "paradise_lost:block/levita_rail_on", + "y": 90 + }, + "powered=true,shape=north_south": { + "model": "paradise_lost:block/levita_rail_on" + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/paradise_lost/lang/en_us.json b/src/main/resources/assets/paradise_lost/lang/en_us.json index fae66b6c6..8bc90e192 100644 --- a/src/main/resources/assets/paradise_lost/lang/en_us.json +++ b/src/main/resources/assets/paradise_lost/lang/en_us.json @@ -233,6 +233,7 @@ "block.paradise_lost.food_bowl": "Feeding Trough", "block.paradise_lost.tree_tap": "Tree Tap", "block.paradise_lost.nitra_bunch": "Nitra Bunch", + "block.paradise_lost.levita_rail": "Levita Rail", "container.paradise_lost.moa": "Moa", diff --git a/src/main/resources/assets/paradise_lost/models/block/levita_rail.json b/src/main/resources/assets/paradise_lost/models/block/levita_rail.json new file mode 100644 index 000000000..5eb88fda5 --- /dev/null +++ b/src/main/resources/assets/paradise_lost/models/block/levita_rail.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/rail_flat", + "textures": { + "rail": "paradise_lost:block/levita_rail" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/paradise_lost/models/block/levita_rail_on.json b/src/main/resources/assets/paradise_lost/models/block/levita_rail_on.json new file mode 100644 index 000000000..cac3e8728 --- /dev/null +++ b/src/main/resources/assets/paradise_lost/models/block/levita_rail_on.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/rail_flat", + "textures": { + "rail": "paradise_lost:block/levita_rail_on" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/paradise_lost/models/block/levita_rail_on_raised_ne.json b/src/main/resources/assets/paradise_lost/models/block/levita_rail_on_raised_ne.json new file mode 100644 index 000000000..078773313 --- /dev/null +++ b/src/main/resources/assets/paradise_lost/models/block/levita_rail_on_raised_ne.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_rail_raised_ne", + "textures": { + "rail": "paradise_lost:block/levita_rail_on" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/paradise_lost/models/block/levita_rail_on_raised_sw.json b/src/main/resources/assets/paradise_lost/models/block/levita_rail_on_raised_sw.json new file mode 100644 index 000000000..f1676a643 --- /dev/null +++ b/src/main/resources/assets/paradise_lost/models/block/levita_rail_on_raised_sw.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_rail_raised_sw", + "textures": { + "rail": "paradise_lost:block/levita_rail_on" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/paradise_lost/models/block/levita_rail_raised_ne.json b/src/main/resources/assets/paradise_lost/models/block/levita_rail_raised_ne.json new file mode 100644 index 000000000..d946151b8 --- /dev/null +++ b/src/main/resources/assets/paradise_lost/models/block/levita_rail_raised_ne.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_rail_raised_ne", + "textures": { + "rail": "paradise_lost:block/levita_rail" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/paradise_lost/models/block/levita_rail_raised_sw.json b/src/main/resources/assets/paradise_lost/models/block/levita_rail_raised_sw.json new file mode 100644 index 000000000..72059caaf --- /dev/null +++ b/src/main/resources/assets/paradise_lost/models/block/levita_rail_raised_sw.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/template_rail_raised_sw", + "textures": { + "rail": "paradise_lost:block/levita_rail" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/paradise_lost/models/item/levita_rail.json b/src/main/resources/assets/paradise_lost/models/item/levita_rail.json new file mode 100644 index 000000000..e7e4258c9 --- /dev/null +++ b/src/main/resources/assets/paradise_lost/models/item/levita_rail.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "paradise_lost:block/levita_rail" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/paradise_lost/particles/levita_bloop.json b/src/main/resources/assets/paradise_lost/particles/levita_bloop.json new file mode 100644 index 000000000..ca698ca44 --- /dev/null +++ b/src/main/resources/assets/paradise_lost/particles/levita_bloop.json @@ -0,0 +1,5 @@ +{ + "textures": [ + "minecraft:generic_0" + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/paradise_lost/textures/block/levita_rail.png b/src/main/resources/assets/paradise_lost/textures/block/levita_rail.png new file mode 100644 index 0000000000000000000000000000000000000000..99fabf525fd5defe6aa37e4ff69673a53f8684fa GIT binary patch literal 540 zcmV+%0^|LOP)Px$)=5M`R5*=&lfh~lK^Vt>vlBdcG15cyU`tC6g^i^4BJ>G@f`{}C)Y1%fb(0lI4ohehEK_pE?*$LIF@L7Z^@L5eY%t z_UQ~l8iQY))@<^+d~TV-QB_W)eZZnHfz!mAAaKQz0$ClX?-ZqLm9 z_A4aI6%U)))Ws2B^jaSY!CWc)Am;tSy4x2F48-9i6jKmmr9>nI(==tQl$e5emBF@{ zD@9exXSHOx+RdO?F3@+Hx&dngS?l{-QflLaoeb)m4L^vfO3C8vI(voMrw?#`h#$lp z*iX7=3`~3ZIZeF#Y*Uqz;UpC18I5kwi1I$DXw6B@<`Ouq*|aM@U7dBGxppT5fU7q! zI!Vto@zzAZ5?~vC30000Px$-AP12R5*=&ld*0ZK@f(&-LoiYFiPPx#7amJbVf=lr1%9aVbMf1DO_B`6^WJ7 zZm5ycP|#SSN=t!+9LYUz-~*kdI~+?iX->oqQjqQ@1?(Be;HhS3|6R>|`!B4b+wF?$ zx?UUJ#Mn&0+FVqPY7WGx+wF!BN7GFCNE<#tS0mvjw@`99|GTbkHA$3Lu-$&>x1% z*Fx3ysI@~rwC`vXY}R$_xi*FSKldhOg79-(W_oiAz{PZ&?wJvuW$^!@>CG*^mW{d{ zGxw{HFrO{>6+~2klTMjZvh3K`!UVw!B3|z;yM4mIKF%iOee$-o4?l zbAT5_?AZ^xM+{7R>vNjee{WMn(I1A&JfqR=7}2^9N{OOTu(<#l1)J(ik8z@4^(74O ztqcIJUclfeq5A1BUw@a=xedf8f5C(oMEF{89gEtPrq&K|9SdJes@v#;bq4iV)TK^1 l>>O~?DdTIQ9?M1_`~xiL3CmM4s$Kv9002ovPDHLkV1kKp_g?@2 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/paradise_lost/textures/item/golden_amber.png b/src/main/resources/assets/paradise_lost/textures/item/golden_amber.png index 374a61596f8f4650a1468570ad737c38432d2aff..8e25db844c2e5692c90dbba6914d2450799b0a21 100644 GIT binary patch delta 237 zcmV$xj( zTgdg?6<3=wsD**4LEA!HZHlYSH{=D1LbB0t%UKY3Q!c9|z-D9CVWcLM^6`b)=*70D zsEi$QssljaO&O^P0Og{=-t*G|dk?^eouZ#_V;KQs)gMyA-Af~~eioNX%kL0NxzA~GmR_Dd6x7XLC z{rFhLfB1Q@x&#m?Y>{L>yz0VCo=-|M^imzgcTAgkYJq8Htr>H>`Jro}3ymc~s$5)I zfu!AoZ-<<$+x~x25@=0dw^+;MqDaDwvIopvpEtHSZnHZ4Ux%Hs?fQCq1DhIVLF=zV oPK&dTWigx)NU<~PUChA9@b|dKcjlbO-xz?v)78&qol`;+089&OQUCw| diff --git a/src/main/resources/assets/paradise_lost/textures/item/olvite.png b/src/main/resources/assets/paradise_lost/textures/item/olvite.png index 8184c4f3ec0d8fdf0335d53660bbd96a30860f1b..83d52631c43102f9fa5d3f5178faa84ae2ebdccc 100644 GIT binary patch delta 329 zcmV-P0k;0F1FZv)Ne)Z6!Gi;vLQaPgYL{q9kyj{x^hjOnTmGN#`=6JW_xs_mOPDm= zIEtD8Pscg?-Qo4TY2D9uKZWT@@OH%H^yb?kcCelRVE-}=C#5U}jYqQ>�M6tEWKna# z=g&KTyuL`h-4+FhgTCb(eC`n0a?H^ihV_QR*GC&kmCbrl?}ykidJvfbAX|@B<0ebx|WKjd)@ybKJs0$7ONtI22*`>KKQJclm=YL{p!kyj{xyd!n3Z~1?|?|)ui-tULME@9ko z{U~MvJRRrkcZb)rrgcBt{S+q0!CO(2)0=Nw2;g8X0l@xc8pts*4vqwq0CbEVim36B zxFg^VQK+Tp7(D=fIk4c(<$JQ_IDW|kz{$ot0IhC`O0x>c0|CpTB5Ewn58zB*KoK<; zeEz(D!|RL8+ig*BIp|xyA>a*>EyrCwC#*MAzCPN>Va2Q$^?ryQqX*F`0J7yckzkU5 zH$1@b@s&u>ipUoWz7 aX@MR?u{&$x3>JoOASIrzelF{r5}E*tGZZ2K diff --git a/src/main/resources/assets/paradise_lost/textures/particle/colored_splash_1.png b/src/main/resources/assets/paradise_lost/textures/particle/colored_splash_1.png deleted file mode 100644 index 8ad28ba837a874b4397cd6a3ae8deb50db390326..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 75 zcmeAS@N?(olHy`uVBq!ia0vp^93afW0wnX;%77$;kf)1dNX4z>1@b@s%XdGhTcN<< W=D@u7(9Q#XAZbrmKbLh*2~7YqrV|tZ diff --git a/src/main/resources/assets/paradise_lost/textures/particle/colored_splash_2.png b/src/main/resources/assets/paradise_lost/textures/particle/colored_splash_2.png deleted file mode 100644 index 7b403e47f4e16251649727064e48ba8fef1b7557..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^93afW0wnX;%77#Tzo(01NX4z>1^PGs%eS*IXp1xM TXDzx=43hJ7^>bP0l+XkK%_k4Y diff --git a/src/main/resources/assets/paradise_lost/textures/particle/colored_splash_3.png b/src/main/resources/assets/paradise_lost/textures/particle/colored_splash_3.png deleted file mode 100644 index 99c69560adf2de46ad8278ab498209c0fd61c6f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 75 zcmeAS@N?(olHy`uVBq!ia0vp^93afW0wnX;%77$;kf)1dNX4z>1@b@s%ljs9PGVs2 W{=&TIU{KTokhG_(pUXO@geCwLni0(a diff --git a/src/main/resources/assets/paradise_lost/textures/particle/levita_boop.png b/src/main/resources/assets/paradise_lost/textures/particle/levita_boop.png new file mode 100644 index 0000000000000000000000000000000000000000..b00f8e5b6b7bfdc294dacb92a710ee605101b52e GIT binary patch literal 101 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEa{HEjtmSN`)Ym%P6qO2JY5_^ xB&H@OEYM$}`}6<)ZBPE!rx>bP?Pio_U`Q`!eYlSO;5(o?22WQ%mvv4FO#rq-9Pa=C literal 0 HcmV?d00001 diff --git a/src/main/resources/data/minecraft/tags/block/rails.json b/src/main/resources/data/minecraft/tags/block/rails.json new file mode 100644 index 000000000..8517887b2 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/block/rails.json @@ -0,0 +1,5 @@ +{ + "values": [ + "paradise_lost:levita_rail" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/loot_table/blocks/levita_rail.json b/src/main/resources/data/paradise_lost/loot_table/blocks/levita_rail.json new file mode 100644 index 000000000..a4bf7773e --- /dev/null +++ b/src/main/resources/data/paradise_lost/loot_table/blocks/levita_rail.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "paradise_lost:levita_rail" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "paradise_lost:blocks/levita_rail" +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/recipe/levita_rail.json b/src/main/resources/data/paradise_lost/recipe/levita_rail.json new file mode 100644 index 000000000..2fea0b899 --- /dev/null +++ b/src/main/resources/data/paradise_lost/recipe/levita_rail.json @@ -0,0 +1,23 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "ILI", + "ISI", + "ILI" + ], + "key": { + "I": { + "tag": "paradise_lost:iron_interchangable" + }, + "L": { + "item": "paradise_lost:levita_gem" + }, + "S": { + "item": "minecraft:stick" + } + }, + "result": { + "id": "paradise_lost:levita_rail", + "count": 12 + } +} diff --git a/src/main/resources/data/paradise_lost/tags/item/iron_interchangable.json b/src/main/resources/data/paradise_lost/tags/item/iron_interchangable.json new file mode 100644 index 000000000..76ae14704 --- /dev/null +++ b/src/main/resources/data/paradise_lost/tags/item/iron_interchangable.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "minecraft:iron_ingot", + "paradise_lost:olvite" + ] +} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index a08a1eb0c..d7876fd5e 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -56,8 +56,7 @@ "custom": { "cardinal-components": [ "paradise_lost:moa_genetics", - "paradise_lost:luv", - "paradise_lost:lore_state" + "paradise_lost:minecart_float" ], "modmenu": { "links": { diff --git a/src/main/resources/paradise_lost.mixins.json b/src/main/resources/paradise_lost.mixins.json index 1755a9609..c6b69a212 100644 --- a/src/main/resources/paradise_lost.mixins.json +++ b/src/main/resources/paradise_lost.mixins.json @@ -12,10 +12,10 @@ "brain.MemoryModuleTypeInvoker", "brain.SensorTypeInvoker", "enchantment.EnchantmentHelperMixin", + "entity.AbstractMinecartEntityMixin", "entity.BoatEntityMixin", "entity.ChestBoatEntityMixin", "entity.CowEntityMixin", - "entity.EntityMixin", "entity.LivingEntityMixin", "entity.PiglinBrainMixin", "entity.PlayerEntityMixin",