Rohan Verma



Commit Diff


commit - a190da66ab827c4e4afc6260fd39867633c37b20
commit + 5facb9ab2c86d1ca0425b91045f3cabaa00be62d
blob - 7c26c1ee22d2cdff335f81b30925c93d4f2d6320
blob + 0038b8c1182b2acfa4def34f8218b70dd9147d3f
--- src/main/java/com/techsupportred/capybaramod/capybaramod.java
+++ src/main/java/com/techsupportred/capybaramod/capybaramod.java
@@ -1,56 +1,56 @@
-package com.techsupportred.capybaramod;
-
-import com.mojang.logging.LogUtils;
-import com.techsupportred.capybaramod.entity.client.CapybaraRenderer;
-import com.techsupportred.capybaramod.item.ModItems;
-import net.minecraft.client.renderer.entity.EntityRenderers;
-import net.minecraft.world.entity.SpawnPlacements;
-import net.minecraft.world.entity.animal.Animal;
-import net.minecraft.world.level.levelgen.Heightmap;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.eventbus.api.IEventBus;
-import net.minecraftforge.fml.common.Mod;
-import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
-import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
-import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
-import org.slf4j.Logger;
-import software.bernie.geckolib3.GeckoLib;
-import com.techsupportred.capybaramod.entity.ModEntityTypes;
-
-// The value here should match an entry in the META-INF/mods.toml file
-@Mod(capybaramod.MOD_ID)
-public class capybaramod {
-    public static final String MOD_ID = "capybaramod";
-    // Directly reference a slf4j logger
-    private static final Logger LOGGER = LogUtils.getLogger();
-
-    public capybaramod() {
-        IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();
-
-        ModItems.register(eventBus);
-
-        ModEntityTypes.register(eventBus);
-
-        eventBus.addListener(this::setup);
-        eventBus.addListener(this::clientSetup);
-
-        GeckoLib.initialize();
-
-        // Register ourselves for server and other game events we are interested in
-        MinecraftForge.EVENT_BUS.register(this);
-    }
-
-    private void clientSetup(final FMLClientSetupEvent event) {
-        EntityRenderers.register(ModEntityTypes.CAPYBARA.get(), CapybaraRenderer::new);
-
-    }
-
-    private void setup(final FMLCommonSetupEvent event) {
-        event.enqueueWork(() -> {
-            SpawnPlacements.register(ModEntityTypes.CAPYBARA.get(),
-                    SpawnPlacements.Type.ON_GROUND,
-                    Heightmap.Types.MOTION_BLOCKING_NO_LEAVES,
-                    Animal::checkAnimalSpawnRules);
-
-        });
+package com.techsupportred.capybaramod;

+

+import com.mojang.logging.LogUtils;

+import com.techsupportred.capybaramod.entity.client.CapybaraRenderer;

+import com.techsupportred.capybaramod.item.ModItems;

+import net.minecraft.client.renderer.entity.EntityRenderers;

+import net.minecraft.world.entity.SpawnPlacements;

+import net.minecraft.world.entity.animal.Animal;

+import net.minecraft.world.level.levelgen.Heightmap;

+import net.minecraftforge.common.MinecraftForge;

+import net.minecraftforge.eventbus.api.IEventBus;

+import net.minecraftforge.fml.common.Mod;

+import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;

+import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;

+import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

+import org.slf4j.Logger;

+import software.bernie.geckolib3.GeckoLib;

+import com.techsupportred.capybaramod.entity.ModEntityTypes;

+

+// The value here should match an entry in the META-INF/mods.toml file

+@Mod(capybaramod.MOD_ID)

+public class capybaramod {

+    public static final String MOD_ID = "capybaramod";

+    // Directly reference a slf4j logger

+    private static final Logger LOGGER = LogUtils.getLogger();

+

+    public capybaramod() {

+        IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();

+

+        ModItems.register(eventBus);

+

+        ModEntityTypes.register(eventBus);

+

+        eventBus.addListener(this::setup);

+        eventBus.addListener(this::clientSetup);

+

+        GeckoLib.initialize();

+

+        // Register ourselves for server and other game events we are interested in

+        MinecraftForge.EVENT_BUS.register(this);

+    }

+

+    private void clientSetup(final FMLClientSetupEvent event) {

+        EntityRenderers.register(ModEntityTypes.CAPYBARA.get(), CapybaraRenderer::new);

+

+    }

+

+    private void setup(final FMLCommonSetupEvent event) {

+        event.enqueueWork(() -> {

+            SpawnPlacements.register(ModEntityTypes.CAPYBARA.get(),

+                    SpawnPlacements.Type.ON_GROUND,

+                    Heightmap.Types.MOTION_BLOCKING_NO_LEAVES,

+                    Animal::checkAnimalSpawnRules);

+

+        });

 }}
\ No newline at end of file
blob - 53533c610f5a07d0f6fb0d40c2a3b6473fd05217
blob + 7488c39978091fb021b179dab640dd415012b462
--- src/main/java/com/techsupportred/capybaramod/entity/ModEntityTypes.java
+++ src/main/java/com/techsupportred/capybaramod/entity/ModEntityTypes.java
@@ -1,27 +1,27 @@
-package com.techsupportred.capybaramod.entity;
-
-import com.techsupportred.capybaramod.capybaramod;
-import com.techsupportred.capybaramod.entity.custom.CapybaraEntity;
-import net.minecraft.resources.ResourceLocation;
-import net.minecraft.world.entity.EntityType;
-import net.minecraft.world.entity.MobCategory;
-import net.minecraftforge.eventbus.api.IEventBus;
-import net.minecraftforge.registries.DeferredRegister;
-import net.minecraftforge.registries.ForgeRegistries;
-import net.minecraftforge.registries.RegistryObject;
-
-public class ModEntityTypes {
-    public static final DeferredRegister<EntityType<?>> ENTITY_TYPES =
-            DeferredRegister.create(ForgeRegistries.ENTITIES, capybaramod.MOD_ID);
-
-    public static final RegistryObject<EntityType<CapybaraEntity>> CAPYBARA =
-            ENTITY_TYPES.register("capybara",
-                    () -> EntityType.Builder.of(CapybaraEntity::new, MobCategory.CREATURE)
-                            .sized(0.8f, 1f)
-                            .build(new ResourceLocation(capybaramod.MOD_ID, "capybara").toString()));
-
-
-    public static void register(IEventBus eventBus) {
-        ENTITY_TYPES.register(eventBus);
-    }
+package com.techsupportred.capybaramod.entity;

+

+import com.techsupportred.capybaramod.capybaramod;

+import com.techsupportred.capybaramod.entity.custom.CapybaraEntity;

+import net.minecraft.resources.ResourceLocation;

+import net.minecraft.world.entity.EntityType;

+import net.minecraft.world.entity.MobCategory;

+import net.minecraftforge.eventbus.api.IEventBus;

+import net.minecraftforge.registries.DeferredRegister;

+import net.minecraftforge.registries.ForgeRegistries;

+import net.minecraftforge.registries.RegistryObject;

+

+public class ModEntityTypes {

+    public static final DeferredRegister<EntityType<?>> ENTITY_TYPES =

+            DeferredRegister.create(ForgeRegistries.ENTITIES, capybaramod.MOD_ID);

+

+    public static final RegistryObject<EntityType<CapybaraEntity>> CAPYBARA =

+            ENTITY_TYPES.register("capybara",

+                    () -> EntityType.Builder.of(CapybaraEntity::new, MobCategory.CREATURE)

+                            .sized(0.8f, 1f)

+                            .build(new ResourceLocation(capybaramod.MOD_ID, "capybara").toString()));

+

+

+    public static void register(IEventBus eventBus) {

+        ENTITY_TYPES.register(eventBus);

+    }

 }
\ No newline at end of file
blob - 270ceb777b4c98b65a187dbb4b72bc90ce1d92f9
blob + 12a7c896fefc836ce773bfcc55851c2c33164e3c
--- src/main/java/com/techsupportred/capybaramod/entity/client/CapybaraModel.java
+++ src/main/java/com/techsupportred/capybaramod/entity/client/CapybaraModel.java
@@ -1,23 +1,23 @@
-package com.techsupportred.capybaramod.entity.client;
-
-import com.techsupportred.capybaramod.capybaramod;
-import com.techsupportred.capybaramod.entity.custom.CapybaraEntity;
-import net.minecraft.resources.ResourceLocation;
-import software.bernie.geckolib3.model.AnimatedGeoModel;
-
-public class CapybaraModel extends AnimatedGeoModel<CapybaraEntity> {
-    @Override
-    public ResourceLocation getModelLocation(CapybaraEntity object) {
-        return new ResourceLocation(capybaramod.MOD_ID, "geo/capybara.geo.json");
-    }
-
-    @Override
-    public ResourceLocation getTextureLocation(CapybaraEntity object) {
-        return new ResourceLocation(capybaramod.MOD_ID, "textures/entity/capybara/capybara.png");
-    }
-
-    @Override
-    public ResourceLocation getAnimationFileLocation(CapybaraEntity animatable) {
-        return new ResourceLocation(capybaramod.MOD_ID, "animations/capybara.animation.json");
-    }
-}
+package com.techsupportred.capybaramod.entity.client;

+

+import com.techsupportred.capybaramod.capybaramod;

+import com.techsupportred.capybaramod.entity.custom.CapybaraEntity;

+import net.minecraft.resources.ResourceLocation;

+import software.bernie.geckolib3.model.AnimatedGeoModel;

+

+public class CapybaraModel extends AnimatedGeoModel<CapybaraEntity> {

+    @Override

+    public ResourceLocation getModelLocation(CapybaraEntity object) {

+        return new ResourceLocation(capybaramod.MOD_ID, "geo/capybara.geo.json");

+    }

+

+    @Override

+    public ResourceLocation getTextureLocation(CapybaraEntity object) {

+        return new ResourceLocation(capybaramod.MOD_ID, "textures/entity/capybara/capybara.png");

+    }

+

+    @Override

+    public ResourceLocation getAnimationFileLocation(CapybaraEntity animatable) {

+        return new ResourceLocation(capybaramod.MOD_ID, "animations/capybara.animation.json");

+    }

+}

blob - 365da8faf263ce4fc70e23ce6f0307bea34b4cdf
blob + f7cdc38c4d22e372aea223b32b894ca72c88ac73
--- src/main/java/com/techsupportred/capybaramod/entity/client/CapybaraRenderer.java
+++ src/main/java/com/techsupportred/capybaramod/entity/client/CapybaraRenderer.java
@@ -1,35 +1,35 @@
-package com.techsupportred.capybaramod.entity.client;
-
-import com.mojang.blaze3d.vertex.PoseStack;
-import com.mojang.blaze3d.vertex.VertexConsumer;
-import com.techsupportred.capybaramod.capybaramod;
-import com.techsupportred.capybaramod.entity.custom.CapybaraEntity;
-import net.minecraft.client.renderer.MultiBufferSource;
-import net.minecraft.client.renderer.RenderType;
-import net.minecraft.client.renderer.entity.EntityRendererProvider;
-import net.minecraft.resources.ResourceLocation;
-import software.bernie.geckolib3.renderers.geo.GeoEntityRenderer;
-
-public class CapybaraRenderer extends GeoEntityRenderer<CapybaraEntity> {
-    public CapybaraRenderer(EntityRendererProvider.Context renderManager) {
-        super(renderManager, new CapybaraModel());
-        this.shadowRadius = 0.3f;
-    }
-
-    @Override
-    public ResourceLocation getTextureLocation(CapybaraEntity instance) {
-        return new ResourceLocation(capybaramod.MOD_ID, "textures/entity/capybara/capybara.png");
-    }
-
-    @Override
-    public RenderType getRenderType(CapybaraEntity animatable, float partialTicks, PoseStack stack,
-                                    MultiBufferSource renderTypeBuffer, VertexConsumer vertexBuilder, int packedLightIn,
-                                    ResourceLocation textureLocation) {
-        if(animatable.isBaby()) {
-            stack.scale(0.4F, 0.4F, 0.4F);
-        } else {
-            stack.scale(0.8F, 0.8F, 0.8F);
-        }
-        return super.getRenderType(animatable, partialTicks, stack, renderTypeBuffer, vertexBuilder, packedLightIn, textureLocation);
-    }
+package com.techsupportred.capybaramod.entity.client;

+

+import com.mojang.blaze3d.vertex.PoseStack;

+import com.mojang.blaze3d.vertex.VertexConsumer;

+import com.techsupportred.capybaramod.capybaramod;

+import com.techsupportred.capybaramod.entity.custom.CapybaraEntity;

+import net.minecraft.client.renderer.MultiBufferSource;

+import net.minecraft.client.renderer.RenderType;

+import net.minecraft.client.renderer.entity.EntityRendererProvider;

+import net.minecraft.resources.ResourceLocation;

+import software.bernie.geckolib3.renderers.geo.GeoEntityRenderer;

+

+public class CapybaraRenderer extends GeoEntityRenderer<CapybaraEntity> {

+    public CapybaraRenderer(EntityRendererProvider.Context renderManager) {

+        super(renderManager, new CapybaraModel());

+        this.shadowRadius = 0.3f;

+    }

+

+    @Override

+    public ResourceLocation getTextureLocation(CapybaraEntity instance) {

+        return new ResourceLocation(capybaramod.MOD_ID, "textures/entity/capybara/capybara.png");

+    }

+

+    @Override

+    public RenderType getRenderType(CapybaraEntity animatable, float partialTicks, PoseStack stack,

+                                    MultiBufferSource renderTypeBuffer, VertexConsumer vertexBuilder, int packedLightIn,

+                                    ResourceLocation textureLocation) {

+        if(animatable.isBaby()) {

+            stack.scale(0.4F, 0.4F, 0.4F);

+        } else {

+            stack.scale(0.8F, 0.8F, 0.8F);

+        }

+        return super.getRenderType(animatable, partialTicks, stack, renderTypeBuffer, vertexBuilder, packedLightIn, textureLocation);

+    }

 }
\ No newline at end of file
blob - 0c0cb69b2129fcd1b866a7e0e3e67f6c6d6747d3
blob + 45f0e2c1927d455fe954b91016589cb9ba8d2784
--- src/main/java/com/techsupportred/capybaramod/entity/custom/CapybaraEntity.java
+++ src/main/java/com/techsupportred/capybaramod/entity/custom/CapybaraEntity.java
@@ -1,208 +1,208 @@
-package com.techsupportred.capybaramod.entity.custom;
-
-import com.techsupportred.capybaramod.entity.ModEntityTypes;
-import net.minecraft.core.BlockPos;
-import net.minecraft.nbt.CompoundTag;
-import net.minecraft.network.syncher.EntityDataAccessor;
-import net.minecraft.network.syncher.EntityDataSerializers;
-import net.minecraft.network.syncher.SynchedEntityData;
-import net.minecraft.server.level.ServerLevel;
-import net.minecraft.sounds.SoundEvent;
-import net.minecraft.sounds.SoundEvents;
-import net.minecraft.world.InteractionHand;
-import net.minecraft.world.InteractionResult;
-import net.minecraft.world.entity.AgeableMob;
-import net.minecraft.world.entity.EntityType;
-import net.minecraft.world.entity.TamableAnimal;
-import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
-import net.minecraft.world.entity.ai.attributes.Attributes;
-import net.minecraft.world.entity.ai.goal.*;
-import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal;
-import net.minecraft.world.entity.player.Player;
-import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemStack;
-import net.minecraft.world.item.Items;
-import net.minecraft.world.level.Level;
-import net.minecraft.world.level.block.state.BlockState;
-import net.minecraft.world.scores.Team;
-import net.minecraftforge.event.ForgeEventFactory;
-import org.jetbrains.annotations.Nullable;
-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;
-
-public class CapybaraEntity extends TamableAnimal implements IAnimatable {
-    private AnimationFactory factory = new AnimationFactory(this);
-
-    private static final EntityDataAccessor<Boolean> SITTING =
-            SynchedEntityData.defineId(CapybaraEntity.class, EntityDataSerializers.BOOLEAN);
-
-    public CapybaraEntity(EntityType<? extends TamableAnimal> entityType, Level level1) {
-        super(entityType, level1);
-    }
-
-    public static AttributeSupplier setAttributes() {
-        return TamableAnimal.createMobAttributes()
-                .add(Attributes.MAX_HEALTH, 10.0D)
-                .add(Attributes.MOVEMENT_SPEED, 0.3f).build();
-    }
-
-    @Override
-
-    protected void registerGoals() {
-        this.goalSelector.addGoal(1, new FloatGoal(this));
-        this.goalSelector.addGoal(1, new SitWhenOrderedToGoal(this));
-        this.goalSelector.addGoal(2, new PanicGoal(this,1.250));
-        this.goalSelector.addGoal(2, new BreedGoal(this, 1.250));
-        this.goalSelector.addGoal(3, new LookAtPlayerGoal(this, Player.class, 8.0F));
-        this.goalSelector.addGoal(3, new FollowOwnerGoal(this, 1.0D, 10.0F, 2.0F, false));
-
-        this.goalSelector.addGoal(4, new WaterAvoidingRandomStrollGoal(this, 1.0D));
-        this.goalSelector.addGoal(5, new RandomLookAroundGoal(this));
-        this.targetSelector.addGoal(6, (new HurtByTargetGoal(this)).setAlertOthers());
-    }
-
-    @Nullable
-    @Override
-    public AgeableMob getBreedOffspring(ServerLevel serverLevel, AgeableMob ageableMob) {
-        return ModEntityTypes.CAPYBARA.get().create(serverLevel);
-    }
-
-    @Override
-    public boolean isFood(ItemStack pStack) {
-        return pStack.getItem() == Items.APPLE;
-    }
-
-        private <E extends IAnimatable> PlayState predicate(AnimationEvent<E> event) {
-            if (event.isMoving()) {
-                event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.capybara.walk", true));
-                return PlayState.CONTINUE;
-            }
-
-            if (this.isSitting()) {
-                event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.capybara.sitting"));
-                return PlayState.CONTINUE;
-            }
-
-            event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.capybara.idle", true));
-            return PlayState.CONTINUE;
-        }
-
-        @Override
-        public void registerControllers(AnimationData data) {
-            data.addAnimationController(new AnimationController(this, "controller",
-                    0, this::predicate));
-        }
-
-        @Override
-        public AnimationFactory getFactory() {
-            return this.factory;
-        }
-        protected void playStepSound(BlockPos pos, BlockState blockIn) {
-            this.playSound(SoundEvents.SWEET_BERRY_BUSH_PICK_BERRIES, 0.15F, 1.0F);
-        }
-
-        protected SoundEvent getAmbientSound() {
-            return SoundEvents.FOX_AMBIENT;
-        }
-
-        protected SoundEvent getDeathSound() {
-            return SoundEvents.DOLPHIN_DEATH;
-        }
-
-        protected float getSoundVolume() { return 0.2F; }
-
-
-    @Override
-    public InteractionResult mobInteract(Player player, InteractionHand hand) {
-        ItemStack itemstack = player.getItemInHand(hand);
-        Item item = itemstack.getItem();
-
-        Item itemForTaming = Items.SUGAR_CANE;
-
-        if(isFood(itemstack)) {
-            return super.mobInteract(player, hand);
-        }
-
-        if (item == itemForTaming && !isTame()) {
-            if (this.level.isClientSide) {
-                return InteractionResult.CONSUME;
-            } else {
-                if (!player.getAbilities().instabuild) {
-                    itemstack.shrink(1);
-                }
-
-                if (!ForgeEventFactory.onAnimalTame(this, player)) {
-                    if (!this.level.isClientSide) {
-                        super.tame(player);
-                        this.navigation.recomputePath();
-                        this.setTarget(null);
-                        this.level.broadcastEntityEvent(this, (byte)7);
-                        setSitting(true);
-                    }
-                }
-
-                return InteractionResult.SUCCESS;
-            }
-        }
-
-
-        if(isTame() && !this.level.isClientSide && hand == InteractionHand.MAIN_HAND) {
-            setSitting(!isSitting());
-            return InteractionResult.SUCCESS;
-        }
-
-        if (itemstack.getItem() == itemForTaming) {
-            return InteractionResult.PASS;
-        }
-
-        return super.mobInteract(player, hand);
-    }
-
-    @Override
-        public void readAdditionalSaveData(CompoundTag tag) {
-            super.readAdditionalSaveData(tag);
-            setSitting(tag.getBoolean("isSitting"));
-        }
-
-        @Override
-        public void addAdditionalSaveData(CompoundTag tag) {
-            super.addAdditionalSaveData(tag);
-            tag.putBoolean("isSitting", this.isSitting());
-        }
-
-        @Override
-        protected void defineSynchedData() {
-            super.defineSynchedData();
-            this.entityData.define(SITTING, false);
-        }
-
-        public void setSitting(boolean sitting) {
-            this.entityData.set(SITTING, sitting);
-            this.setOrderedToSit(sitting);
-        }
-
-        public boolean isSitting() {
-            return this.entityData.get(SITTING);
-        }
-
-        @Override
-        public Team getTeam() {
-            return super.getTeam();
-        }
-
-        public boolean canBeLeashed(Player player) {
-            return true;
-        }
-
-    @Override
-    public void setTame(boolean tamed) {
-        super.setTame(tamed);
-        getAttribute(Attributes.MAX_HEALTH).setBaseValue(10.0D);
-        getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue((double)0.3f);
-    }
+package com.techsupportred.capybaramod.entity.custom;

+

+import com.techsupportred.capybaramod.entity.ModEntityTypes;

+import net.minecraft.core.BlockPos;

+import net.minecraft.nbt.CompoundTag;

+import net.minecraft.network.syncher.EntityDataAccessor;

+import net.minecraft.network.syncher.EntityDataSerializers;

+import net.minecraft.network.syncher.SynchedEntityData;

+import net.minecraft.server.level.ServerLevel;

+import net.minecraft.sounds.SoundEvent;

+import net.minecraft.sounds.SoundEvents;

+import net.minecraft.world.InteractionHand;

+import net.minecraft.world.InteractionResult;

+import net.minecraft.world.entity.AgeableMob;

+import net.minecraft.world.entity.EntityType;

+import net.minecraft.world.entity.TamableAnimal;

+import net.minecraft.world.entity.ai.attributes.AttributeSupplier;

+import net.minecraft.world.entity.ai.attributes.Attributes;

+import net.minecraft.world.entity.ai.goal.*;

+import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal;

+import net.minecraft.world.entity.player.Player;

+import net.minecraft.world.item.Item;

+import net.minecraft.world.item.ItemStack;

+import net.minecraft.world.item.Items;

+import net.minecraft.world.level.Level;

+import net.minecraft.world.level.block.state.BlockState;

+import net.minecraft.world.scores.Team;

+import net.minecraftforge.event.ForgeEventFactory;

+import org.jetbrains.annotations.Nullable;

+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;

+

+public class CapybaraEntity extends TamableAnimal implements IAnimatable {

+    private AnimationFactory factory = new AnimationFactory(this);

+

+    private static final EntityDataAccessor<Boolean> SITTING =

+            SynchedEntityData.defineId(CapybaraEntity.class, EntityDataSerializers.BOOLEAN);

+

+    public CapybaraEntity(EntityType<? extends TamableAnimal> entityType, Level level1) {

+        super(entityType, level1);

+    }

+

+    public static AttributeSupplier setAttributes() {

+        return TamableAnimal.createMobAttributes()

+                .add(Attributes.MAX_HEALTH, 10.0D)

+                .add(Attributes.MOVEMENT_SPEED, 0.3f).build();

+    }

+

+    @Override

+

+    protected void registerGoals() {

+        this.goalSelector.addGoal(1, new FloatGoal(this));

+        this.goalSelector.addGoal(1, new SitWhenOrderedToGoal(this));

+        this.goalSelector.addGoal(2, new PanicGoal(this,1.250));

+        this.goalSelector.addGoal(2, new BreedGoal(this, 1.250));

+        this.goalSelector.addGoal(3, new LookAtPlayerGoal(this, Player.class, 8.0F));

+        this.goalSelector.addGoal(3, new FollowOwnerGoal(this, 1.0D, 10.0F, 2.0F, false));

+

+        this.goalSelector.addGoal(4, new WaterAvoidingRandomStrollGoal(this, 1.0D));

+        this.goalSelector.addGoal(5, new RandomLookAroundGoal(this));

+        this.targetSelector.addGoal(6, (new HurtByTargetGoal(this)).setAlertOthers());

+    }

+

+    @Nullable

+    @Override

+    public AgeableMob getBreedOffspring(ServerLevel serverLevel, AgeableMob ageableMob) {

+        return ModEntityTypes.CAPYBARA.get().create(serverLevel);

+    }

+

+    @Override

+    public boolean isFood(ItemStack pStack) {

+        return pStack.getItem() == Items.APPLE;

+    }

+

+        private <E extends IAnimatable> PlayState predicate(AnimationEvent<E> event) {

+            if (event.isMoving()) {

+                event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.capybara.walk", true));

+                return PlayState.CONTINUE;

+            }

+

+            if (this.isSitting()) {

+                event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.capybara.sitting"));

+                return PlayState.CONTINUE;

+            }

+

+            event.getController().setAnimation(new AnimationBuilder().addAnimation("animation.capybara.idle", true));

+            return PlayState.CONTINUE;

+        }

+

+        @Override

+        public void registerControllers(AnimationData data) {

+            data.addAnimationController(new AnimationController(this, "controller",

+                    0, this::predicate));

+        }

+

+        @Override

+        public AnimationFactory getFactory() {

+            return this.factory;

+        }

+        protected void playStepSound(BlockPos pos, BlockState blockIn) {

+            this.playSound(SoundEvents.SWEET_BERRY_BUSH_PICK_BERRIES, 0.15F, 1.0F);

+        }

+

+        protected SoundEvent getAmbientSound() {

+            return SoundEvents.FOX_AMBIENT;

+        }

+

+        protected SoundEvent getDeathSound() {

+            return SoundEvents.DOLPHIN_DEATH;

+        }

+

+        protected float getSoundVolume() { return 0.2F; }

+

+

+    @Override

+    public InteractionResult mobInteract(Player player, InteractionHand hand) {

+        ItemStack itemstack = player.getItemInHand(hand);

+        Item item = itemstack.getItem();

+

+        Item itemForTaming = Items.SUGAR_CANE;

+

+        if(isFood(itemstack)) {

+            return super.mobInteract(player, hand);

+        }

+

+        if (item == itemForTaming && !isTame()) {

+            if (this.level.isClientSide) {

+                return InteractionResult.CONSUME;

+            } else {

+                if (!player.getAbilities().instabuild) {

+                    itemstack.shrink(1);

+                }

+

+                if (!ForgeEventFactory.onAnimalTame(this, player)) {

+                    if (!this.level.isClientSide) {

+                        super.tame(player);

+                        this.navigation.recomputePath();

+                        this.setTarget(null);

+                        this.level.broadcastEntityEvent(this, (byte)7);

+                        setSitting(true);

+                    }

+                }

+

+                return InteractionResult.SUCCESS;

+            }

+        }

+

+

+        if(isTame() && !this.level.isClientSide && hand == InteractionHand.MAIN_HAND) {

+            setSitting(!isSitting());

+            return InteractionResult.SUCCESS;

+        }

+

+        if (itemstack.getItem() == itemForTaming) {

+            return InteractionResult.PASS;

+        }

+

+        return super.mobInteract(player, hand);

+    }

+

+    @Override

+        public void readAdditionalSaveData(CompoundTag tag) {

+            super.readAdditionalSaveData(tag);

+            setSitting(tag.getBoolean("isSitting"));

+        }

+

+        @Override

+        public void addAdditionalSaveData(CompoundTag tag) {

+            super.addAdditionalSaveData(tag);

+            tag.putBoolean("isSitting", this.isSitting());

+        }

+

+        @Override

+        protected void defineSynchedData() {

+            super.defineSynchedData();

+            this.entityData.define(SITTING, false);

+        }

+

+        public void setSitting(boolean sitting) {

+            this.entityData.set(SITTING, sitting);

+            this.setOrderedToSit(sitting);

+        }

+

+        public boolean isSitting() {

+            return this.entityData.get(SITTING);

+        }

+

+        @Override

+        public Team getTeam() {

+            return super.getTeam();

+        }

+

+        public boolean canBeLeashed(Player player) {

+            return true;

+        }

+

+    @Override

+    public void setTame(boolean tamed) {

+        super.setTame(tamed);

+        getAttribute(Attributes.MAX_HEALTH).setBaseValue(10.0D);

+        getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue((double)0.3f);

+    }

 }
\ No newline at end of file
blob - 17c167fad4765beaee29fda1b4f2d45e2aecff9e
blob + 8248ef875d04086569d5591d729227ed32e20dbd
--- src/main/java/com/techsupportred/capybaramod/event/ModEventBusEvents.java
+++ src/main/java/com/techsupportred/capybaramod/event/ModEventBusEvents.java
@@ -1,19 +1,19 @@
-package com.techsupportred.capybaramod.event;
-
-import com.techsupportred.capybaramod.capybaramod;
-import com.techsupportred.capybaramod.entity.ModEntityTypes;
-import com.techsupportred.capybaramod.entity.custom.CapybaraEntity;
-import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
-import net.minecraftforge.eventbus.api.SubscribeEvent;
-import net.minecraftforge.fml.common.Mod;
-
-import javax.annotation.Nonnull;
-
-@Mod.EventBusSubscriber(modid = capybaramod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
-public class ModEventBusEvents {
-
-    @SubscribeEvent
-    public static void entityAttributeEvent(EntityAttributeCreationEvent event) {
-        event.put(ModEntityTypes.CAPYBARA.get(), CapybaraEntity.setAttributes());
-    }
+package com.techsupportred.capybaramod.event;

+

+import com.techsupportred.capybaramod.capybaramod;

+import com.techsupportred.capybaramod.entity.ModEntityTypes;

+import com.techsupportred.capybaramod.entity.custom.CapybaraEntity;

+import net.minecraftforge.event.entity.EntityAttributeCreationEvent;

+import net.minecraftforge.eventbus.api.SubscribeEvent;

+import net.minecraftforge.fml.common.Mod;

+

+import javax.annotation.Nonnull;

+

+@Mod.EventBusSubscriber(modid = capybaramod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)

+public class ModEventBusEvents {

+

+    @SubscribeEvent

+    public static void entityAttributeEvent(EntityAttributeCreationEvent event) {

+        event.put(ModEntityTypes.CAPYBARA.get(), CapybaraEntity.setAttributes());

+    }

 }
\ No newline at end of file
blob - 35d50e11bb737fcb6926192768eec3b6689dafc4
blob + e3b494dece03ee5558c937bb0baf186122d52ea9
--- src/main/java/com/techsupportred/capybaramod/item/ModItems.java
+++ src/main/java/com/techsupportred/capybaramod/item/ModItems.java
@@ -1,24 +1,24 @@
-package com.techsupportred.capybaramod.item;
-
-import com.techsupportred.capybaramod.capybaramod;
-import com.techsupportred.capybaramod.entity.ModEntityTypes;
-import net.minecraft.world.item.*;
-import net.minecraftforge.common.ForgeSpawnEggItem;
-import net.minecraftforge.eventbus.api.IEventBus;
-import net.minecraftforge.registries.DeferredRegister;
-import net.minecraftforge.registries.ForgeRegistries;
-import net.minecraftforge.registries.RegistryObject;
-
-public class ModItems {
-    public static final DeferredRegister<Item> ITEMS =
-            DeferredRegister.create(ForgeRegistries.ITEMS, capybaramod.MOD_ID);
-
-    public static final RegistryObject<Item> CAPYBARA_SPAWN_EGG = ITEMS.register("capybara_spawn_egg",
-            () -> new ForgeSpawnEggItem(ModEntityTypes.CAPYBARA,0xC4A484, 0x5C4033,
-                    new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
-
-    public static void register(IEventBus eventBus) {
-        ITEMS.register(eventBus);
-    }
-}
-
+package com.techsupportred.capybaramod.item;

+

+import com.techsupportred.capybaramod.capybaramod;

+import com.techsupportred.capybaramod.entity.ModEntityTypes;

+import net.minecraft.world.item.*;

+import net.minecraftforge.common.ForgeSpawnEggItem;

+import net.minecraftforge.eventbus.api.IEventBus;

+import net.minecraftforge.registries.DeferredRegister;

+import net.minecraftforge.registries.ForgeRegistries;

+import net.minecraftforge.registries.RegistryObject;

+

+public class ModItems {

+    public static final DeferredRegister<Item> ITEMS =

+            DeferredRegister.create(ForgeRegistries.ITEMS, capybaramod.MOD_ID);

+

+    public static final RegistryObject<Item> CAPYBARA_SPAWN_EGG = ITEMS.register("capybara_spawn_egg",

+            () -> new ForgeSpawnEggItem(ModEntityTypes.CAPYBARA,0xC4A484, 0x5C4033,

+                    new Item.Properties().tab(CreativeModeTab.TAB_MISC)));

+

+    public static void register(IEventBus eventBus) {

+        ITEMS.register(eventBus);

+    }

+}

+

blob - e35b9bfaa7ac304f380f780e7aca4c570e5aff83
blob + 914a423deb187df33670a35d7440dfd52711026c
--- src/main/java/com/techsupportred/capybaramod/world/ModWorldEvents.java
+++ src/main/java/com/techsupportred/capybaramod/world/ModWorldEvents.java
@@ -1,15 +1,15 @@
-package com.techsupportred.capybaramod.world;
-
-import com.techsupportred.capybaramod.capybaramod;
-import com.techsupportred.capybaramod.world.gen.ModEntityGeneration;
-import net.minecraftforge.event.world.BiomeLoadingEvent;
-import net.minecraftforge.eventbus.api.SubscribeEvent;
-import net.minecraftforge.fml.common.Mod;
-
-@Mod.EventBusSubscriber(modid = capybaramod.MOD_ID)
-public class ModWorldEvents {
-    @SubscribeEvent
-    public static void biomeLoadingEvent(final BiomeLoadingEvent event) {
-        ModEntityGeneration.onEntitySpawn(event);
-    }
+package com.techsupportred.capybaramod.world;

+

+import com.techsupportred.capybaramod.capybaramod;

+import com.techsupportred.capybaramod.world.gen.ModEntityGeneration;

+import net.minecraftforge.event.world.BiomeLoadingEvent;

+import net.minecraftforge.eventbus.api.SubscribeEvent;

+import net.minecraftforge.fml.common.Mod;

+

+@Mod.EventBusSubscriber(modid = capybaramod.MOD_ID)

+public class ModWorldEvents {

+    @SubscribeEvent

+    public static void biomeLoadingEvent(final BiomeLoadingEvent event) {

+        ModEntityGeneration.onEntitySpawn(event);

+    }

 }
\ No newline at end of file
blob - ea771ae125f1ff688775164da5dc77f8dac5e420
blob + a44a7a2c3e2f9b79deaf406eb633d7bbfe095d9a
--- src/main/java/com/techsupportred/capybaramod/world/gen/ModEntityGeneration.java
+++ src/main/java/com/techsupportred/capybaramod/world/gen/ModEntityGeneration.java
@@ -1,70 +1,70 @@
-package com.techsupportred.capybaramod.world.gen;
-
-import com.techsupportred.capybaramod.entity.ModEntityTypes;
-import net.minecraft.resources.ResourceKey;
-import net.minecraft.world.entity.EntityType;
-import net.minecraft.world.level.biome.Biome;
-import net.minecraft.world.level.biome.MobSpawnSettings;
-import net.minecraftforge.event.world.BiomeLoadingEvent;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class ModEntityGeneration {
-    public static void onEntitySpawn(final BiomeLoadingEvent event) {
-        addEntityToAllOverworldBiomes(event, ModEntityTypes.CAPYBARA.get(),
-                40, 2, 4);
-    }
-
-    private static void addEntityToAllBiomesExceptThese(BiomeLoadingEvent event, EntityType<?> type,
-                                                        int weight, int minCount, int maxCount, ResourceKey<Biome>... biomes) {
-        // Goes through each entry in the biomes and sees if it matches the current biome we are loading
-        boolean isBiomeSelected = Arrays.stream(biomes).map(ResourceKey::location)
-                .map(Object::toString).anyMatch(s -> s.equals(event.getName().toString()));
-
-        if(!isBiomeSelected) {
-            addEntityToAllBiomes(event, type, weight, minCount, maxCount);
-        }
-    }
-
-    @SafeVarargs
-    private static void addEntityToSpecificBiomes(BiomeLoadingEvent event, EntityType<?> type,
-                                                  int weight, int minCount, int maxCount, ResourceKey<Biome>... biomes) {
-        // Goes through each entry in the biomes and sees if it matches the current biome we are loading
-        boolean isBiomeSelected = Arrays.stream(biomes).map(ResourceKey::location)
-                .map(Object::toString).anyMatch(s -> s.equals(event.getName().toString()));
-
-        if(isBiomeSelected) {
-            addEntityToAllBiomes(event, type, weight, minCount, maxCount);
-        }
-    }
-
-    private static void addEntityToAllOverworldBiomes(BiomeLoadingEvent event, EntityType<?> type,
-                                                      int weight, int minCount, int maxCount) {
-        if(!event.getCategory().equals(Biome.BiomeCategory.THEEND) && !event.getCategory().equals(Biome.BiomeCategory.NETHER)) {
-            addEntityToAllBiomes(event, type, weight, minCount, maxCount);
-        }
-    }
-
-    private static void addEntityToAllBiomesNoNether(BiomeLoadingEvent event, EntityType<?> type,
-                                                     int weight, int minCount, int maxCount) {
-        if(!event.getCategory().equals(Biome.BiomeCategory.NETHER)) {
-            List<MobSpawnSettings.SpawnerData> base = event.getSpawns().getSpawner(type.getCategory());
-            base.add(new MobSpawnSettings.SpawnerData(type,weight, minCount, maxCount));
-        }
-    }
-
-    private static void addEntityToAllBiomesNoEnd(BiomeLoadingEvent event, EntityType<?> type,
-                                                  int weight, int minCount, int maxCount) {
-        if(!event.getCategory().equals(Biome.BiomeCategory.THEEND)) {
-            List<MobSpawnSettings.SpawnerData> base = event.getSpawns().getSpawner(type.getCategory());
-            base.add(new MobSpawnSettings.SpawnerData(type,weight, minCount, maxCount));
-        }
-    }
-
-    private static void addEntityToAllBiomes(BiomeLoadingEvent event, EntityType<?> type,
-                                             int weight, int minCount, int maxCount) {
-        List<MobSpawnSettings.SpawnerData> base = event.getSpawns().getSpawner(type.getCategory());
-        base.add(new MobSpawnSettings.SpawnerData(type,weight, minCount, maxCount));
-    }
-}
+package com.techsupportred.capybaramod.world.gen;

+

+import com.techsupportred.capybaramod.entity.ModEntityTypes;

+import net.minecraft.resources.ResourceKey;

+import net.minecraft.world.entity.EntityType;

+import net.minecraft.world.level.biome.Biome;

+import net.minecraft.world.level.biome.MobSpawnSettings;

+import net.minecraftforge.event.world.BiomeLoadingEvent;

+

+import java.util.Arrays;

+import java.util.List;

+

+public class ModEntityGeneration {

+    public static void onEntitySpawn(final BiomeLoadingEvent event) {

+        addEntityToAllOverworldBiomes(event, ModEntityTypes.CAPYBARA.get(),

+                40, 2, 4);

+    }

+

+    private static void addEntityToAllBiomesExceptThese(BiomeLoadingEvent event, EntityType<?> type,

+                                                        int weight, int minCount, int maxCount, ResourceKey<Biome>... biomes) {

+        // Goes through each entry in the biomes and sees if it matches the current biome we are loading

+        boolean isBiomeSelected = Arrays.stream(biomes).map(ResourceKey::location)

+                .map(Object::toString).anyMatch(s -> s.equals(event.getName().toString()));

+

+        if(!isBiomeSelected) {

+            addEntityToAllBiomes(event, type, weight, minCount, maxCount);

+        }

+    }

+

+    @SafeVarargs

+    private static void addEntityToSpecificBiomes(BiomeLoadingEvent event, EntityType<?> type,

+                                                  int weight, int minCount, int maxCount, ResourceKey<Biome>... biomes) {

+        // Goes through each entry in the biomes and sees if it matches the current biome we are loading

+        boolean isBiomeSelected = Arrays.stream(biomes).map(ResourceKey::location)

+                .map(Object::toString).anyMatch(s -> s.equals(event.getName().toString()));

+

+        if(isBiomeSelected) {

+            addEntityToAllBiomes(event, type, weight, minCount, maxCount);

+        }

+    }

+

+    private static void addEntityToAllOverworldBiomes(BiomeLoadingEvent event, EntityType<?> type,

+                                                      int weight, int minCount, int maxCount) {

+        if(!event.getCategory().equals(Biome.BiomeCategory.THEEND) && !event.getCategory().equals(Biome.BiomeCategory.NETHER)) {

+            addEntityToAllBiomes(event, type, weight, minCount, maxCount);

+        }

+    }

+

+    private static void addEntityToAllBiomesNoNether(BiomeLoadingEvent event, EntityType<?> type,

+                                                     int weight, int minCount, int maxCount) {

+        if(!event.getCategory().equals(Biome.BiomeCategory.NETHER)) {

+            List<MobSpawnSettings.SpawnerData> base = event.getSpawns().getSpawner(type.getCategory());

+            base.add(new MobSpawnSettings.SpawnerData(type,weight, minCount, maxCount));

+        }

+    }

+

+    private static void addEntityToAllBiomesNoEnd(BiomeLoadingEvent event, EntityType<?> type,

+                                                  int weight, int minCount, int maxCount) {

+        if(!event.getCategory().equals(Biome.BiomeCategory.THEEND)) {

+            List<MobSpawnSettings.SpawnerData> base = event.getSpawns().getSpawner(type.getCategory());

+            base.add(new MobSpawnSettings.SpawnerData(type,weight, minCount, maxCount));

+        }

+    }

+

+    private static void addEntityToAllBiomes(BiomeLoadingEvent event, EntityType<?> type,

+                                             int weight, int minCount, int maxCount) {

+        List<MobSpawnSettings.SpawnerData> base = event.getSpawns().getSpawner(type.getCategory());

+        base.add(new MobSpawnSettings.SpawnerData(type,weight, minCount, maxCount));

+    }

+}

blob - 903561828a32bbf22fd7fd5cb0c26512e1eb9655
blob + bb81e35ff4288f20a9935e49fb078b22c38ae4c7
--- src/main/resources/META-INF/mods.toml
+++ src/main/resources/META-INF/mods.toml
@@ -1,62 +1,62 @@
-# This is an example mods.toml file. It contains the data relating to the loading mods.
-# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
-# The overall format is standard TOML format, v0.5.0.
-# Note that there are a couple of TOML lists in this file.
-# Find more information on toml format here:  https://github.com/toml-lang/toml
-# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
-modLoader="javafml" #mandatory
-# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
-loaderVersion="[40,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
-# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.
-# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.
-license="MIT"
-# A URL to refer people to when problems occur with this mod
-#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional
-# A list of mods - how many allowed here is determined by the individual mod loader
-[[mods]] #mandatory
-# The modid of the mod
-modId="capybaramod" #mandatory
-# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
-# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
-# see the associated build.gradle script for how to populate this completely automatically during a build
-version="0.0.1" #mandatory
- # A display name for the mod
-displayName="capybara" #mandatory
-# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
-#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
-# A URL for the "homepage" for this mod, displayed in the mod UI
-#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional
-# A file name (in the root of the mod JAR) containing a logo for display
-logoFile="examplemod.png" #optional
-# A text field displayed in the mod UI
-credits="Thanks for this example mod goes to Java" #optional
-# A text field displayed in the mod UI
-authors="TechSupportRed" #optional
-# The description text for the mod (multi line!) (#mandatory)
-description='''
-This is a long form description of the mod. You can write whatever you want here
-
-Have some lorem ipsum.
-
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
-'''
-# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
-[[dependencies.capybaramod]] #optional
-    # the modid of the dependency
-    modId="forge" #mandatory
-    # Does this dependency have to exist - if not, ordering below must be specified
-    mandatory=true #mandatory
-    # The version range of the dependency
-    versionRange="[40,)" #mandatory
-    # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
-    ordering="NONE"
-    # Side this dependency is applied on - BOTH, CLIENT or SERVER
-    side="BOTH"
-# Here's another dependency
-[[dependencies.capybaramod]]
-    modId="minecraft"
-    mandatory=true
-# This version range declares a minimum of the current minecraft version up to but not including the next major version
-    versionRange="[1.18.2,1.19)"
-    ordering="NONE"
-    side="BOTH"
+# This is an example mods.toml file. It contains the data relating to the loading mods.

+# There are several mandatory fields (#mandatory), and many more that are optional (#optional).

+# The overall format is standard TOML format, v0.5.0.

+# Note that there are a couple of TOML lists in this file.

+# Find more information on toml format here:  https://github.com/toml-lang/toml

+# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml

+modLoader="javafml" #mandatory

+# A version range to match for said mod loader - for regular FML @Mod it will be the forge version

+loaderVersion="[40,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.

+# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties.

+# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here.

+license="MIT"

+# A URL to refer people to when problems occur with this mod

+#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional

+# A list of mods - how many allowed here is determined by the individual mod loader

+[[mods]] #mandatory

+# The modid of the mod

+modId="capybaramod" #mandatory

+# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it

+# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata

+# see the associated build.gradle script for how to populate this completely automatically during a build

+version="0.0.1" #mandatory

+ # A display name for the mod

+displayName="capybara" #mandatory

+# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/

+#updateJSONURL="https://change.me.example.invalid/updates.json" #optional

+# A URL for the "homepage" for this mod, displayed in the mod UI

+#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional

+# A file name (in the root of the mod JAR) containing a logo for display

+logoFile="examplemod.png" #optional

+# A text field displayed in the mod UI

+credits="Thanks for this example mod goes to Java" #optional

+# A text field displayed in the mod UI

+authors="TechSupportRed" #optional

+# The description text for the mod (multi line!) (#mandatory)

+description='''

+This is a long form description of the mod. You can write whatever you want here

+

+Have some lorem ipsum.

+

+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

+'''

+# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.

+[[dependencies.capybaramod]] #optional

+    # the modid of the dependency

+    modId="forge" #mandatory

+    # Does this dependency have to exist - if not, ordering below must be specified

+    mandatory=true #mandatory

+    # The version range of the dependency

+    versionRange="[40,)" #mandatory

+    # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory

+    ordering="NONE"

+    # Side this dependency is applied on - BOTH, CLIENT or SERVER

+    side="BOTH"

+# Here's another dependency

+[[dependencies.capybaramod]]

+    modId="minecraft"

+    mandatory=true

+# This version range declares a minimum of the current minecraft version up to but not including the next major version

+    versionRange="[1.18.2,1.19)"

+    ordering="NONE"

+    side="BOTH"

blob - 941b95c217afa48d5cc23768acf38e2f8bbb2f40
blob + ce901338cd1ebcb2c0deaa723ad70da571f972be
--- src/main/resources/assets/capybaramod/animations/capybara.animation.json
+++ src/main/resources/assets/capybaramod/animations/capybara.animation.json
@@ -1,146 +1,146 @@
-{
-	"format_version": "1.8.0",
-	"animations": {
-		"animation.capybara.idle": {
-			"loop": true
-		},
-		"animation.capybara.walk": {
-			"loop": true,
-			"animation_length": 1,
-			"bones": {
-				"body": {
-					"rotation": {
-						"0.0": {
-							"vector": [0, 0, 0]
-						},
-						"0.5": {
-							"vector": [-2.5, 0, 0]
-						},
-						"1.0": {
-							"vector": [0, 0, 0]
-						}
-					}
-				},
-				"bone": {
-					"rotation": {
-						"0.0": {
-							"vector": [0, 0, 0]
-						},
-						"0.5": {
-							"vector": [-2.5, 0, 0]
-						},
-						"1.0": {
-							"vector": [0, 0, 0]
-						}
-					},
-					"position": {
-						"0.0": {
-							"vector": [0, 0, 0]
-						},
-						"0.5": {
-							"vector": [0, 1, 0]
-						},
-						"1.0": {
-							"vector": [0, 0, 0]
-						}
-					}
-				},
-				"leg1": {
-					"rotation": {
-						"0.0": {
-							"vector": [-20, 0, 0]
-						},
-						"0.5": {
-							"vector": [20, 0, 0]
-						},
-						"1.0": {
-							"vector": [-20, 0, 0]
-						}
-					}
-				},
-				"leg2": {
-					"rotation": {
-						"0.0": {
-							"vector": [20, 0, 0]
-						},
-						"0.5": {
-							"vector": [-20, 0, 0]
-						},
-						"1.0": {
-							"vector": [20, 0, 0]
-						}
-					}
-				},
-				"leg3": {
-					"rotation": {
-						"0.0": {
-							"vector": [20, 0, 0]
-						},
-						"0.5": {
-							"vector": [-20, 0, 0]
-						},
-						"1.0": {
-							"vector": [20, 0, 0]
-						}
-					}
-				},
-				"leg4": {
-					"rotation": {
-						"0.0": {
-							"vector": [-20, 0, 0]
-						},
-						"0.5": {
-							"vector": [20, 0, 0]
-						},
-						"1.0": {
-							"vector": [-20, 0, 0]
-						}
-					}
-				}
-			}
-		},
-		"animation.capybara.sitting": {
-			"loop": true,
-			"bones": {
-				"body": {
-					"position": {
-						"vector": [0, -2, 0]
-					}
-				},
-				"leg1": {
-					"rotation": {
-						"vector": [-87.5, 32.5, 0]
-					},
-					"position": {
-						"vector": [0, -4, 2]
-					}
-				},
-				"leg2": {
-					"rotation": {
-						"vector": [-90, -27.5, 0]
-					},
-					"position": {
-						"vector": [0, -4, 2]
-					}
-				},
-				"leg3": {
-					"rotation": {
-						"vector": [-90, 42.5, 0]
-					},
-					"position": {
-						"vector": [0, -4, 0]
-					}
-				},
-				"leg4": {
-					"rotation": {
-						"vector": [-90, -32.5, 0]
-					},
-					"position": {
-						"vector": [0, -4, 0]
-					}
-				}
-			}
-		}
-	},
-	"geckolib_format_version": 2
+{

+	"format_version": "1.8.0",

+	"animations": {

+		"animation.capybara.idle": {

+			"loop": true

+		},

+		"animation.capybara.walk": {

+			"loop": true,

+			"animation_length": 1,

+			"bones": {

+				"body": {

+					"rotation": {

+						"0.0": {

+							"vector": [0, 0, 0]

+						},

+						"0.5": {

+							"vector": [-2.5, 0, 0]

+						},

+						"1.0": {

+							"vector": [0, 0, 0]

+						}

+					}

+				},

+				"bone": {

+					"rotation": {

+						"0.0": {

+							"vector": [0, 0, 0]

+						},

+						"0.5": {

+							"vector": [-2.5, 0, 0]

+						},

+						"1.0": {

+							"vector": [0, 0, 0]

+						}

+					},

+					"position": {

+						"0.0": {

+							"vector": [0, 0, 0]

+						},

+						"0.5": {

+							"vector": [0, 1, 0]

+						},

+						"1.0": {

+							"vector": [0, 0, 0]

+						}

+					}

+				},

+				"leg1": {

+					"rotation": {

+						"0.0": {

+							"vector": [-20, 0, 0]

+						},

+						"0.5": {

+							"vector": [20, 0, 0]

+						},

+						"1.0": {

+							"vector": [-20, 0, 0]

+						}

+					}

+				},

+				"leg2": {

+					"rotation": {

+						"0.0": {

+							"vector": [20, 0, 0]

+						},

+						"0.5": {

+							"vector": [-20, 0, 0]

+						},

+						"1.0": {

+							"vector": [20, 0, 0]

+						}

+					}

+				},

+				"leg3": {

+					"rotation": {

+						"0.0": {

+							"vector": [20, 0, 0]

+						},

+						"0.5": {

+							"vector": [-20, 0, 0]

+						},

+						"1.0": {

+							"vector": [20, 0, 0]

+						}

+					}

+				},

+				"leg4": {

+					"rotation": {

+						"0.0": {

+							"vector": [-20, 0, 0]

+						},

+						"0.5": {

+							"vector": [20, 0, 0]

+						},

+						"1.0": {

+							"vector": [-20, 0, 0]

+						}

+					}

+				}

+			}

+		},

+		"animation.capybara.sitting": {

+			"loop": true,

+			"bones": {

+				"body": {

+					"position": {

+						"vector": [0, -2, 0]

+					}

+				},

+				"leg1": {

+					"rotation": {

+						"vector": [-87.5, 32.5, 0]

+					},

+					"position": {

+						"vector": [0, -4, 2]

+					}

+				},

+				"leg2": {

+					"rotation": {

+						"vector": [-90, -27.5, 0]

+					},

+					"position": {

+						"vector": [0, -4, 2]

+					}

+				},

+				"leg3": {

+					"rotation": {

+						"vector": [-90, 42.5, 0]

+					},

+					"position": {

+						"vector": [0, -4, 0]

+					}

+				},

+				"leg4": {

+					"rotation": {

+						"vector": [-90, -32.5, 0]

+					},

+					"position": {

+						"vector": [0, -4, 0]

+					}

+				}

+			}

+		}

+	},

+	"geckolib_format_version": 2

 }
\ No newline at end of file
blob - 902bd5a5e5187a8475836c6566c756ffa309ae2e
blob + b46abdabee87640783811c90ea6713bc1aa8839b
--- src/main/resources/assets/capybaramod/geo/capybara.geo.json
+++ src/main/resources/assets/capybaramod/geo/capybara.geo.json
@@ -1,81 +1,81 @@
-{
-	"format_version": "1.12.0",
-	"minecraft:geometry": [
-		{
-			"description": {
-				"identifier": "geometry.unknown",
-				"texture_width": 64,
-				"texture_height": 64,
-				"visible_bounds_width": 3,
-				"visible_bounds_height": 2.5,
-				"visible_bounds_offset": [0, 0.75, 0]
-			},
-			"bones": [
-				{
-					"name": "body",
-					"pivot": [-1, 13, 3],
-					"rotation": [90, 0, 0],
-					"cubes": [
-						{"origin": [-4.5, 7, -4], "size": [9, 16, 8], "uv": [0, 0]}
-					]
-				},
-				{
-					"name": "head",
-					"pivot": [0, 12, -7]
-				},
-				{
-					"name": "bone",
-					"parent": "head",
-					"pivot": [-0.5, 12, -11.5],
-					"rotation": [17.5, 0, 0],
-					"cubes": [
-						{"origin": [-3.5, 9, -15.5], "size": [7, 7, 11], "uv": [0, 25]},
-						{"origin": [2.5, 16, -7.5], "size": [1, 1, 2], "uv": [0, 0]},
-						{"origin": [-3.5, 16, -7.5], "size": [1, 1, 2], "uv": [0, 0]}
-					]
-				},
-				{
-					"name": "bone2",
-					"parent": "bone",
-					"pivot": [6.75, 11.85, -6.25],
-					"rotation": [-3.01437, 0.65335, -41.48194]
-				},
-				{
-					"name": "bone3",
-					"parent": "bone",
-					"pivot": [0, 21.5, -8]
-				},
-				{
-					"name": "leg1",
-					"pivot": [-3, 6, 7],
-					"cubes": [
-						{"origin": [-4.5, 0, 5], "size": [4, 6, 4], "uv": [26, 24]}
-					]
-				},
-				{
-					"name": "leg2",
-					"pivot": [3, 6, 7],
-					"mirror": true,
-					"cubes": [
-						{"origin": [0.5, 0, 5], "size": [4, 6, 4], "uv": [26, 24]}
-					]
-				},
-				{
-					"name": "leg3",
-					"pivot": [-3, 6, -5],
-					"cubes": [
-						{"origin": [-4.5, 0, -7], "size": [4, 6, 4], "uv": [26, 24]}
-					]
-				},
-				{
-					"name": "leg4",
-					"pivot": [3, 6, -5],
-					"mirror": true,
-					"cubes": [
-						{"origin": [0.5, 0, -7], "size": [4, 6, 4], "uv": [26, 24]}
-					]
-				}
-			]
-		}
-	]
+{

+	"format_version": "1.12.0",

+	"minecraft:geometry": [

+		{

+			"description": {

+				"identifier": "geometry.unknown",

+				"texture_width": 64,

+				"texture_height": 64,

+				"visible_bounds_width": 3,

+				"visible_bounds_height": 2.5,

+				"visible_bounds_offset": [0, 0.75, 0]

+			},

+			"bones": [

+				{

+					"name": "body",

+					"pivot": [-1, 13, 3],

+					"rotation": [90, 0, 0],

+					"cubes": [

+						{"origin": [-4.5, 7, -4], "size": [9, 16, 8], "uv": [0, 0]}

+					]

+				},

+				{

+					"name": "head",

+					"pivot": [0, 12, -7]

+				},

+				{

+					"name": "bone",

+					"parent": "head",

+					"pivot": [-0.5, 12, -11.5],

+					"rotation": [17.5, 0, 0],

+					"cubes": [

+						{"origin": [-3.5, 9, -15.5], "size": [7, 7, 11], "uv": [0, 25]},

+						{"origin": [2.5, 16, -7.5], "size": [1, 1, 2], "uv": [0, 0]},

+						{"origin": [-3.5, 16, -7.5], "size": [1, 1, 2], "uv": [0, 0]}

+					]

+				},

+				{

+					"name": "bone2",

+					"parent": "bone",

+					"pivot": [6.75, 11.85, -6.25],

+					"rotation": [-3.01437, 0.65335, -41.48194]

+				},

+				{

+					"name": "bone3",

+					"parent": "bone",

+					"pivot": [0, 21.5, -8]

+				},

+				{

+					"name": "leg1",

+					"pivot": [-3, 6, 7],

+					"cubes": [

+						{"origin": [-4.5, 0, 5], "size": [4, 6, 4], "uv": [26, 24]}

+					]

+				},

+				{

+					"name": "leg2",

+					"pivot": [3, 6, 7],

+					"mirror": true,

+					"cubes": [

+						{"origin": [0.5, 0, 5], "size": [4, 6, 4], "uv": [26, 24]}

+					]

+				},

+				{

+					"name": "leg3",

+					"pivot": [-3, 6, -5],

+					"cubes": [

+						{"origin": [-4.5, 0, -7], "size": [4, 6, 4], "uv": [26, 24]}

+					]

+				},

+				{

+					"name": "leg4",

+					"pivot": [3, 6, -5],

+					"mirror": true,

+					"cubes": [

+						{"origin": [0.5, 0, -7], "size": [4, 6, 4], "uv": [26, 24]}

+					]

+				}

+			]

+		}

+	]

 }
\ No newline at end of file
blob - a8b2da6c7b20d79aeb42126a76cda3e1a18efae5
blob + f58aa56e10be890f779eec860ba32a62d2fcea6c
--- src/main/resources/assets/capybaramod/lang/en_us.json
+++ src/main/resources/assets/capybaramod/lang/en_us.json
@@ -1,3 +1,3 @@
-{
-  "item.capybaramod.capybara_spawn_egg": "Capybara Spawn Egg"
+{

+  "item.capybaramod.capybara_spawn_egg": "Capybara Spawn Egg"

 }
\ No newline at end of file
blob - d1aaa9d6efdd855226de4eaa4f770bde2465d5fb
blob + 38194e8c1dbc456128e907840a4422c3825fb65e
--- src/main/resources/assets/capybaramod/models/item/capybara_spawn_egg.json
+++ src/main/resources/assets/capybaramod/models/item/capybara_spawn_egg.json
@@ -1,3 +1,3 @@
-{
-  "parent": "minecraft:item/template_spawn_egg"
+{

+  "parent": "minecraft:item/template_spawn_egg"

 }
\ No newline at end of file
blob - 6f2f48b7e4c86f9700e07c4b3af87c27d90670d0
blob + 2f974103773ecc4ebbff0fa68d97109c4253d778
--- src/main/resources/pack.mcmeta
+++ src/main/resources/pack.mcmeta
@@ -1,8 +1,8 @@
-{
-    "pack": {
-        "description": "examplemod resources",
-        "pack_format": 9,
-        "forge:resource_pack_format": 8,
-        "forge:data_pack_format": 9
-    }
-}
+{

+    "pack": {

+        "description": "examplemod resources",

+        "pack_format": 9,

+        "forge:resource_pack_format": 8,

+        "forge:data_pack_format": 9

+    }

+}