diff --git a/build.gradle b/build.gradle index 70b91ab..9f2f5a6 100644 --- a/build.gradle +++ b/build.gradle @@ -20,15 +20,15 @@ repositories { } dependencies { - modImplementation 'software.bernie.geckolib:geckolib-fabric-1.17:3.0.15:dev' + modImplementation 'software.bernie.geckolib:geckolib-fabric-1.18:3.0.4:dev' // To change the versions see the gradle.properties file - minecraft "com.mojang:minecraft:1.17.1" - mappings "net.fabricmc:yarn:1.17.1+build.61:v2" + minecraft "com.mojang:minecraft:21w38a" + mappings "net.fabricmc:yarn:21w38a+build.11:v2" modImplementation "net.fabricmc:fabric-loader:0.12.0" // Fabric API. This is technically optional, but you probably want it anyway. - modImplementation "net.fabricmc.fabric-api:fabric-api:0.40.1+1.17" + modImplementation "net.fabricmc.fabric-api:fabric-api:0.40.4+1.18" // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs. // You may need to force-disable transitiveness on them. diff --git a/gradle.properties b/gradle.properties index 96b4fb6..19029ca 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/versions.html - minecraft_version=1.17.1 - yarn_mappings=1.17.1+build.61 + minecraft_version=21w38a + yarn_mappings=21w38a+build.11 loader_version=0.12.0 # Mod Properties @@ -13,5 +13,5 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = trajans-tanks # Dependencies -fabric_version=0.40.1+1.17 +fabric_version=0.40.4+1.18 diff --git a/remappedSrc/com/crescentine/tankmod/TankMod.java b/remappedSrc/com/crescentine/tankmod/TankMod.java deleted file mode 100644 index 4bef7c7..0000000 --- a/remappedSrc/com/crescentine/tankmod/TankMod.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.crescentine.tankmod; - -import com.crescentine.tankmod.shell.ShellEntity; -import com.crescentine.tankmod.shell.ShellItem; -import com.crescentine.tankmod.tank.TankEntity; -import net.fabricmc.api.ModInitializer; -import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder; -import net.fabricmc.fabric.api.item.v1.FabricItemSettings; -import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry; -import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder; -import net.minecraft.entity.EntityDimensions; -import net.minecraft.entity.EntityType; -import net.minecraft.entity.SpawnGroup; -import net.minecraft.item.*; -import net.minecraft.util.Identifier; -import net.minecraft.util.registry.Registry; -import software.bernie.geckolib3.GeckoLib; - -public class TankMod implements ModInitializer { - public static final EntityType ShellEntityType = Registry.register( - Registry.ENTITY_TYPE, - new Identifier(TankMod.MOD_ID, "tank_shell"), - FabricEntityTypeBuilder.create(SpawnGroup.MISC, ShellEntity::new) - .dimensions(EntityDimensions.fixed(0.25F, 0.25F)) - .trackRangeBlocks(4).trackedUpdateRate(10) - .build() - ); - - public static final Item ShellEntityItem = new ShellItem(new Item.Settings().group(ItemGroup.MISC).maxCount(16)); - public static final Item TANK_CONTROLLER = new Item(new FabricItemSettings().group(ItemGroup.COMBAT)); - public static final Item NETHERITE_WHEEL = new Item(new FabricItemSettings().group(ItemGroup.MISC)); - public static String MOD_ID = "trajanstanks"; - public static Identifier TANK_ENTITY = new Identifier(MOD_ID,"tank"); - public static final EntityType TANK_ENTITY_TYPE = FabricEntityTypeBuilder.create(SpawnGroup.MISC,TankEntity::new).dimensions(EntityDimensions.fixed(4.0f,2.0f)).trackRangeBlocks(8).build(); - public static final Item TANK_ITEM = new SpawnEggItem(TANK_ENTITY_TYPE, 12895428, 11382189, new Item.Settings().group(ItemGroup.MISC)); - public static final ItemGroup TANKS_GROUP = FabricItemGroupBuilder.create( - new Identifier("trajanstanks", "tanks_groups")) - .icon(() -> new ItemStack(TANK_ITEM)). - appendItems(stacks -> { - stacks.add(new ItemStack(TANK_ITEM)); - stacks.add(new ItemStack(TANK_CONTROLLER)); - stacks.add(new ItemStack(NETHERITE_WHEEL)); }).build(); - - //public static final Item TANK_ITEM = new SpawnEggItem(EntityType.TANK_ENTITY, 12895428, 11382189, new Item.Settings().group(ItemGroup.COMBAT));// - @Override - public void onInitialize() { - Registry.register(Registry.ITEM, new Identifier("trajanstanks", "tank_controller"), TANK_CONTROLLER); - Registry.register(Registry.ITEM, new Identifier(MOD_ID, "shell_item"), ShellEntityItem); - GeckoLib.initialize(); - Registry.register(Registry.ENTITY_TYPE, TANK_ENTITY, TANK_ENTITY_TYPE); - FabricDefaultAttributeRegistry.register(TANK_ENTITY_TYPE, TankEntity.createTankAttributes()); - Registry.register(Registry.ITEM, new Identifier("trajanstanks", "tank_item"), TANK_ITEM); - Registry.register(Registry.ITEM, new Identifier("trajanstanks", "netherite_wheel"), NETHERITE_WHEEL); - - - - } -} diff --git a/remappedSrc/com/crescentine/tankmod/TankModClient.java b/remappedSrc/com/crescentine/tankmod/TankModClient.java deleted file mode 100644 index 11ce2c2..0000000 --- a/remappedSrc/com/crescentine/tankmod/TankModClient.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.crescentine.tankmod; - -import com.crescentine.tankmod.shell.ShellEntitySpawnPacket; -import com.crescentine.tankmod.tank.TankEntityModel; -import com.crescentine.tankmod.tank.TankEntityRenderer; -import net.fabricmc.api.ClientModInitializer; -import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; -import net.fabricmc.fabric.api.client.rendereregistry.v1.EntityRendererRegistry; -import net.fabricmc.fabric.api.network.ClientSidePacketRegistry; -import net.fabricmc.fabric.impl.client.renderer.registry.EntityRendererRegistryImpl; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.option.KeyBinding; -import net.minecraft.client.render.entity.FlyingItemEntityRenderer; -import net.minecraft.client.util.InputUtil; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityType; -import net.minecraft.util.Identifier; -import net.minecraft.util.math.Vec3d; -import net.minecraft.util.registry.Registry; -import org.lwjgl.glfw.GLFW; - -import java.util.UUID; - -public class TankModClient implements ClientModInitializer { - public static final KeyBinding STARTMOVING = KeyBindingHelper.registerKeyBinding(new KeyBinding( - "key.tankmod.startmoving", // The translation key of the keybinding's name - InputUtil.Type.KEYSYM, // The type of the keybinding, KEYSYM for keyboard, MOUSE for mouse. - GLFW.GLFW_KEY_M, // The keycode of the key - "category.tankmod.trajanstanks" // The translation key of the keybinding's category. - )); - - public void receiveEntityPacket() { - ClientSidePacketRegistry.INSTANCE.register(PacketID, (ctx, byteBuf) -> { - EntityType et = Registry.ENTITY_TYPE.get(byteBuf.readVarInt()); - UUID uuid = byteBuf.readUuid(); - int entityId = byteBuf.readVarInt(); - Vec3d pos = ShellEntitySpawnPacket.PacketBufUtil.readVec3d(byteBuf); - float pitch = ShellEntitySpawnPacket.PacketBufUtil.readAngle(byteBuf); - float yaw = ShellEntitySpawnPacket.PacketBufUtil.readAngle(byteBuf); - ctx.getTaskQueue().execute(() -> { - if (MinecraftClient.getInstance().world == null) - throw new IllegalStateException("Tried to spawn entity in a null world!"); - Entity e = et.create(MinecraftClient.getInstance().world); - if (e == null) - throw new IllegalStateException("Failed to create instance of entity \"" + Registry.ENTITY_TYPE.getId(et) + "\"!"); - e.updateTrackedPosition(pos); - e.setPos(pos.x, pos.y, pos.z); - e.setPitch(pitch); - e.setYaw(yaw); - e.setId(entityId); - e.setUuid(uuid); - MinecraftClient.getInstance().world.addEntity(entityId, e); - }); - }); - } - public static final Identifier PacketID = new Identifier(TankMod.MOD_ID, "spawn_packet"); - - @Override - public void onInitializeClient() { - EntityRendererRegistry.INSTANCE.register(TankMod.ShellEntityType, (context) -> - new FlyingItemEntityRenderer(context)); - receiveEntityPacket(); - EntityRendererRegistryImpl.INSTANCE.register(TankMod.TANK_ENTITY_TYPE, ctx -> - new TankEntityRenderer(ctx, new TankEntityModel())); - - - } -} \ No newline at end of file diff --git a/remappedSrc/com/crescentine/tankmod/shell/ShellEntity.java b/remappedSrc/com/crescentine/tankmod/shell/ShellEntity.java deleted file mode 100644 index f11d707..0000000 --- a/remappedSrc/com/crescentine/tankmod/shell/ShellEntity.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.crescentine.tankmod.shell; - -import com.crescentine.tankmod.TankMod; -import com.crescentine.tankmod.TankModClient; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityType; -import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.damage.DamageSource; -import net.minecraft.entity.effect.StatusEffectInstance; -import net.minecraft.entity.effect.StatusEffects; -import net.minecraft.entity.mob.BlazeEntity; -import net.minecraft.entity.projectile.FireballEntity; -import net.minecraft.entity.projectile.thrown.ThrownItemEntity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.network.Packet; -import net.minecraft.particle.ItemStackParticleEffect; -import net.minecraft.particle.ParticleEffect; -import net.minecraft.particle.ParticleTypes; -import net.minecraft.sound.SoundEvents; -import net.minecraft.util.hit.EntityHitResult; -import net.minecraft.util.hit.HitResult; -import net.minecraft.world.World; -import net.minecraft.world.explosion.Explosion; - -public class ShellEntity extends ThrownItemEntity { - public ShellEntity(EntityType entityType, World world) { - super(entityType, world); - } - public ShellEntity(World world, LivingEntity owner) { - super(TankMod.ShellEntityType, owner, world); - } - public ShellEntity(World world, double x, double y, double z) { - super(TankMod.ShellEntityType, x, y, z, world); - } - @Override - protected Item getDefaultItem() { - return TankMod.ShellEntityItem; - } - @Override - public Packet createSpawnPacket() { - return ShellEntitySpawnPacket.create(this, TankModClient.PacketID); - } - - @Environment(EnvType.CLIENT) - private ParticleEffect getParticleParameters() { - ItemStack itemStack = this.getItem(); - return (ParticleEffect) (itemStack.isEmpty() ? ParticleTypes.EXPLOSION : new ItemStackParticleEffect(ParticleTypes.ITEM, itemStack)); - } - - - @Environment(EnvType.CLIENT) - public void handleStatus(byte status) { - if (status == 3) { - ParticleEffect particleEffect = this.getParticleParameters(); - - for (int i = 0; i < 8; ++i) { - this.world.addParticle(particleEffect, this.getX(), this.getY(), this.getZ(), 0.0D, 0.0D, 0.0D); - } - } - } - - protected void onEntityHit(EntityHitResult entityHitResult) { // called on entity hit. - super.onEntityHit(entityHitResult); - Entity entity = entityHitResult.getEntity(); // sets a new Entity instance as the EntityHitResult (victim) - int i = entity instanceof LivingEntity ? 50 : 0; // sets i to 3 if the Entity instance is an instance of BlazeEntity - entity.damage(DamageSource.thrownProjectile(this, this.getOwner()), (float) i); // deals damage - - if (entity instanceof LivingEntity) { - ((LivingEntity) entity).addStatusEffect((new StatusEffectInstance(StatusEffects.BLINDNESS, 20 * 3, 0))); // applies a status effect - ((LivingEntity) entity).addStatusEffect((new StatusEffectInstance(StatusEffects.SLOWNESS, 20 * 3, 2))); // applies a status effect - entity.playSound(SoundEvents.ENTITY_GENERIC_EXPLODE, 2F, 1F); - } - } - - protected void onCollision(HitResult hitResult) { // called on collision with a block - super.onCollision(hitResult); - if (!this.world.isClient) { // checks if the world is client - this.world.sendEntityStatus(this, (byte) 3); // particle? - if (!world.isClient) { - world.createExplosion(this, getX(), getY(), getZ(), 2, Explosion.DestructionType.BREAK); - this.discard(); - } - } - } -} \ No newline at end of file diff --git a/remappedSrc/com/crescentine/tankmod/shell/ShellEntitySpawnPacket.java b/remappedSrc/com/crescentine/tankmod/shell/ShellEntitySpawnPacket.java deleted file mode 100644 index 5bc0a1c..0000000 --- a/remappedSrc/com/crescentine/tankmod/shell/ShellEntitySpawnPacket.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.crescentine.tankmod.shell; - -import io.netty.buffer.Unpooled; -import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; -import net.minecraft.entity.Entity; -import net.minecraft.network.Packet; -import net.minecraft.network.PacketByteBuf; -import net.minecraft.util.Identifier; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.math.Vec3d; -import net.minecraft.util.registry.Registry; - -public class ShellEntitySpawnPacket { - public static Packet create(Entity e, Identifier packetID) { - if (e.world.isClient) - throw new IllegalStateException("SpawnPacketUtil.create called on the logical client!"); - PacketByteBuf byteBuf = new PacketByteBuf(Unpooled.buffer()); - byteBuf.writeVarInt(Registry.ENTITY_TYPE.getRawId(e.getType())); - byteBuf.writeUuid(e.getUuid()); - byteBuf.writeVarInt(e.getId()); - - PacketBufUtil.writeVec3d(byteBuf, e.getPos()); - PacketBufUtil.writeAngle(byteBuf, e.getPitch()); - PacketBufUtil.writeAngle(byteBuf, e.getYaw()); - return ServerPlayNetworking.createS2CPacket(packetID, byteBuf); - } - public static final class PacketBufUtil { - - /** - * Packs a floating-point angle into a {@code byte}. - * - * @param angle - * angle - * @return packed angle - */ - public static byte packAngle(float angle) { - return (byte) MathHelper.floor(angle * 256 / 360); - } - - /** - * Unpacks a floating-point angle from a {@code byte}. - * - * @param angleByte - * packed angle - * @return angle - */ - public static float unpackAngle(byte angleByte) { - return (angleByte * 360) / 256f; - } - - /** - * Writes an angle to a {@link PacketByteBuf}. - * - * @param byteBuf - * destination buffer - * @param angle - * angle - */ - public static void writeAngle(PacketByteBuf byteBuf, float angle) { - byteBuf.writeByte(packAngle(angle)); - } - - /** - * Reads an angle from a {@link PacketByteBuf}. - * - * @param byteBuf - * source buffer - * @return angle - */ - public static float readAngle(PacketByteBuf byteBuf) { - return unpackAngle(byteBuf.readByte()); - } - public static void writeVec3d(PacketByteBuf byteBuf, Vec3d vec3d) { - byteBuf.writeDouble(vec3d.x); - byteBuf.writeDouble(vec3d.y); - byteBuf.writeDouble(vec3d.z); - } - - public static Vec3d readVec3d(PacketByteBuf byteBuf) { - double x = byteBuf.readDouble(); - double y = byteBuf.readDouble(); - double z = byteBuf.readDouble(); - return new Vec3d(x, y, z); - } - } -} diff --git a/remappedSrc/com/crescentine/tankmod/shell/ShellItem.java b/remappedSrc/com/crescentine/tankmod/shell/ShellItem.java deleted file mode 100644 index da86c08..0000000 --- a/remappedSrc/com/crescentine/tankmod/shell/ShellItem.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.crescentine.tankmod.shell; - -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.sound.SoundCategory; -import net.minecraft.sound.SoundEvents; -import net.minecraft.stat.Stats; -import net.minecraft.util.Hand; -import net.minecraft.util.TypedActionResult; -import net.minecraft.world.World; - -public class ShellItem extends Item { - public ShellItem(Settings settings) { - super(settings); - } - /* - public TypedActionResult use(World world, PlayerEntity user, Hand hand) { - ItemStack itemStack = user.getStackInHand(hand); - world.playSound(null, user.getX(), user.getY(), user.getZ(), SoundEvents.ITEM_FIRECHARGE_USE, SoundCategory.NEUTRAL, 0.5F, 1F); - user.getItemCooldownManager().set(this, 5); - if (!world.isClient) { - ShellEntity shellEntity = new ShellEntity(world, user); - shellEntity.setItem(itemStack); - shellEntity.setProperties(user, user.getPitch(), user.getYaw(), 0.0F, 1.5F, 0F); - world.spawnEntity(shellEntity); - } - - user.incrementStat(Stats.USED.getOrCreateStat(this)); - if (!user.getAbilities().creativeMode) { - itemStack.decrement(1); // decrements itemStack if user is not in creative mode - } - - return TypedActionResult.success(itemStack, world.isClient()); - } */ -} diff --git a/remappedSrc/com/crescentine/tankmod/tank/TankEntity.java b/remappedSrc/com/crescentine/tankmod/tank/TankEntity.java deleted file mode 100644 index e4fc4ac..0000000 --- a/remappedSrc/com/crescentine/tankmod/tank/TankEntity.java +++ /dev/null @@ -1,216 +0,0 @@ -package com.crescentine.tankmod.tank; - -import com.crescentine.tankmod.TankMod; -import com.crescentine.tankmod.TankModClient; -import com.crescentine.tankmod.shell.ShellEntity; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.enchantment.Enchantments; -import net.minecraft.entity.*; -import net.minecraft.entity.attribute.DefaultAttributeContainer; -import net.minecraft.entity.attribute.EntityAttributes; -import net.minecraft.entity.damage.DamageSource; -import net.minecraft.entity.passive.PassiveEntity; -import net.minecraft.entity.passive.PigEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.fluid.Fluid; -import net.minecraft.item.ItemStack; -import net.minecraft.server.world.ServerWorld; -import net.minecraft.sound.SoundEvent; -import net.minecraft.sound.SoundEvents; -import net.minecraft.util.ActionResult; -import net.minecraft.util.Arm; -import net.minecraft.util.Hand; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; -import software.bernie.geckolib3.core.IAnimatable; -import software.bernie.geckolib3.core.PlayState; -import software.bernie.geckolib3.core.builder.AnimationBuilder; -import software.bernie.geckolib3.core.controller.AnimationController; -import software.bernie.geckolib3.core.event.predicate.AnimationEvent; -import software.bernie.geckolib3.core.manager.AnimationData; -import software.bernie.geckolib3.core.manager.AnimationFactory; - -import java.util.Set; - -@SuppressWarnings("EntityConstructor") - -public class TankEntity extends PigEntity implements IAnimatable { - private final AnimationFactory factory = new AnimationFactory(this); - - public TankEntity(EntityType entityType, World world) { - super((EntityType) entityType, world); - } - - private PlayState predicate(AnimationEvent event) { - if (event.isMoving()) { - event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.tank.walking", true)); - return PlayState.CONTINUE; - } - return PlayState.STOP; - } - - public static DefaultAttributeContainer.Builder createTankAttributes() { - return LivingEntity.createLivingAttributes() - .add(EntityAttributes.GENERIC_MAX_HEALTH, 70f) - .add(EntityAttributes.GENERIC_MOVEMENT_SPEED, 0.1f) - .add(EntityAttributes.GENERIC_KNOCKBACK_RESISTANCE, 10.0f) - .add(EntityAttributes.GENERIC_FOLLOW_RANGE, 0); - } - - @Override - public boolean canWalkOnFluid(Fluid fluid) { - return false; - } - - @Override - public boolean canBeRiddenInWater() { - return false; - } - - @Override - protected int computeFallDamage(float fallDistance, float damageMultiplier) { - return 0; - } - - @Override - public int getSafeFallDistance() { - return 30; - } - - @Override - protected void removePassenger(Entity entity) { - super.removePassenger(entity); - if (entity instanceof PlayerEntity player) { - player.setInvisible(false); - } - } - - @Override - public boolean cannotDespawn() { - return true; - } - - @Override - public void registerControllers(AnimationData animationData) { - animationData.addAnimationController(new AnimationController<>(this, "controller", 0, this::predicate)); - - } - - - @Override - public AnimationFactory getFactory() { - return this.factory; - } - - @Override - public Iterable getArmorItems() { - return Set.of(); - } - - @Override - public ItemStack getEquippedStack(EquipmentSlot slot) { - return ItemStack.EMPTY; - } - - @Override - protected void initGoals() { - this.goalSelector.clear(); - clearGoalsAndTasks(); - } -//Movement Related - - @Override - public boolean canBeControlledByRider() { - if (TankModClient.STARTMOVING.isPressed()) { - return true; - } - return false; - } - - @Override - protected boolean movesIndependently() { - return true; - } - - @Override - public boolean canMoveVoluntarily() { - return true; - } - - //Movement Related ^ - - @Override - public void equipStack(EquipmentSlot slot, ItemStack stack) { - } - - @Override - public Arm getMainArm() { - return Arm.LEFT; - } - - @Override - public float getSaddledSpeed() { - return 0.15f; - } - - @Override - public void stopRiding() { - super.stopRiding(); - } - - - @Override - public boolean isBaby() { - return false; - } - - @Override - public PigEntity createChild(ServerWorld serverWorld, PassiveEntity passiveEntity) { - return null; - } - - @Override - public ActionResult interactAt(PlayerEntity player, Vec3d hitPos, Hand hand) { - if (!player.getEntityWorld().isClient && player.getStackInHand(hand).getItem() == TankMod.TANK_CONTROLLER) { - player.startRiding(this, true); - player.setInvisible(true); - return ActionResult.SUCCESS; - } - return ActionResult.FAIL; - } - - @Override - protected boolean isImmobile() { - return false; - } - - @Override - protected SoundEvent getAmbientSound() { - return SoundEvents.ENTITY_MINECART_RIDING; - } - - @Override - protected SoundEvent getDeathSound() { - return SoundEvents.ENTITY_GENERIC_EXPLODE; - } - - @Override - protected SoundEvent getHurtSound(DamageSource source) { - return SoundEvents.ITEM_ARMOR_EQUIP_IRON; - } - - @Override - protected SoundEvent getFallSound(int distance) { - return null; - } - - @Override - protected SoundEvent getSplashSound() { - return null; - } - - @Override - protected SoundEvent getSwimSound() { - return null; - } -} diff --git a/remappedSrc/com/crescentine/tankmod/tank/TankEntityModel.java b/remappedSrc/com/crescentine/tankmod/tank/TankEntityModel.java deleted file mode 100644 index 2033283..0000000 --- a/remappedSrc/com/crescentine/tankmod/tank/TankEntityModel.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.crescentine.tankmod.tank; -import com.crescentine.tankmod.TankMod; -import com.crescentine.tankmod.tank.TankEntity; -import net.minecraft.util.Identifier; -import software.bernie.geckolib3.model.AnimatedGeoModel; - -public class TankEntityModel extends AnimatedGeoModel { - @Override - public Identifier getModelLocation(TankEntity object) { - return new Identifier(TankMod.MOD_ID, "geo/tank.geo.json"); - } - - @Override - public Identifier getTextureLocation(TankEntity object) { - return new Identifier(TankMod.MOD_ID, "textures/item/texture.png"); - } - - @Override - public Identifier getAnimationFileLocation(TankEntity animatable) { - return new Identifier(TankMod.MOD_ID, "animations/tank.animation.json"); - } -} diff --git a/remappedSrc/com/crescentine/tankmod/tank/TankEntityRenderer.java b/remappedSrc/com/crescentine/tankmod/tank/TankEntityRenderer.java deleted file mode 100644 index 2727db7..0000000 --- a/remappedSrc/com/crescentine/tankmod/tank/TankEntityRenderer.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.crescentine.tankmod.tank; - -import com.crescentine.tankmod.tank.TankEntity; -import net.minecraft.client.render.entity.EntityRendererFactory; -import software.bernie.geckolib3.model.AnimatedGeoModel; -import software.bernie.geckolib3.renderers.geo.GeoEntityRenderer; - -public class TankEntityRenderer extends GeoEntityRenderer { - public TankEntityRenderer(EntityRendererFactory.Context ctx, AnimatedGeoModel modelProvider) { - super(ctx, modelProvider); - - this.shadowRadius = .5f; - } -} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 5479d4e..486785b 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -34,7 +34,7 @@ "fabricloader": ">=0.11.3", "fabric-key-binding-api-v1": "*", "fabric": "*", - "minecraft": "1.17.x", + "minecraft": "1.18.x", "java": ">=16" }, "suggests": {