Skip to content

Commit

Permalink
Exterminate crafted saddle
Browse files Browse the repository at this point in the history
Vanilla saddles only. No more awkwardness.
#89
  • Loading branch information
IcarussOne committed Jan 7, 2024
1 parent c82de1d commit 6088115
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 53 deletions.
2 changes: 1 addition & 1 deletion src/main/java/drzhark/mocreatures/MoCTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static void dropSaddle(MoCEntityAnimal entity, World world) {
if (!entity.getIsRideable() || world.isRemote) {
return;
}
dropCustomItem(entity, world, new ItemStack(MoCItems.horsesaddle, 1));
dropCustomItem(entity, world, new ItemStack(Items.SADDLE, 1));
entity.setRideable(false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public static void registerAspects(AspectRegistryEvent event) {
proxy.registerObjectTag(new ItemStack(MoCItems.fishnet), new AspectList().add(Aspect.BEAST, 26).add(Aspect.WATER, 3).add(Aspect.CRAFT, 3));
proxy.registerObjectTag(new ItemStack(MoCItems.fishnetfull), new AspectList().add(Aspect.BEAST, 26).add(Aspect.WATER, 3).add(Aspect.CRAFT, 3));
proxy.registerObjectTag(new ItemStack(MoCItems.fur), new AspectList().add(Aspect.BEAST, 6).add(Aspect.PROTECT, 4));
proxy.registerObjectTag(new ItemStack(MoCItems.horsesaddle), new AspectList().add(Aspect.METAL, 5).add(Aspect.BEAST, 10).add(Aspect.MOTION, 10).add(Aspect.ORDER, 5).add(Aspect.CRAFT, 1));
proxy.registerObjectTag(new ItemStack(MoCItems.heartdarkness), new AspectList().add(Aspect.DARKNESS, 10).add(Aspect.LIFE, 5).add(Aspect.EXCHANGE, 1).add(Aspect.BEAST, 5));
proxy.registerObjectTag(new ItemStack(MoCItems.heartfire), new AspectList().add(Aspect.FIRE, 10).add(Aspect.LIFE, 5).add(Aspect.EXCHANGE, 1).add(Aspect.BEAST, 5));
proxy.registerObjectTag(new ItemStack(MoCItems.heartundead), new AspectList().add(Aspect.UNDEAD, 10).add(Aspect.LIFE, 5).add(Aspect.EXCHANGE, 1).add(Aspect.BEAST, 5));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public static void addRecipes() {
energy = 1_500;
SawmillManager.addRecipe(energy, new ItemStack(MoCBlocks.wyvwoodLog), new ItemStack(MoCBlocks.wyvwoodPlanks, 6, 0), ItemMaterial.dustWood, 100);
TapperManager.addStandardMapping(new ItemStack(MoCBlocks.wyvwoodLog), new FluidStack(TFFluids.fluidResin, 100));
SawmillManager.addRecycleRecipe(energy, new ItemStack(MoCItems.horsesaddle), new ItemStack(Items.LEATHER), 3);
SawmillManager.addRecycleRecipe(energy, new ItemStack(MoCItems.whip), new ItemStack(Items.LEATHER), 3);
SawmillManager.addRecipe(energy, new ItemStack(MoCItems.elephantChest), new ItemStack(Blocks.CHEST), new ItemStack(MoCItems.animalHide), 50);
SawmillManager.addRecipe(energy, new ItemStack(MoCItems.elephantGarment), new ItemStack(MoCItems.medallion), new ItemStack(Items.STRING, 12), 100);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public boolean processInteract(EntityPlayer player, EnumHand hand) {
}

if (!stack.isEmpty() && getIsTamed() && !getIsRideable() && (getAge() > 80)
&& (stack.getItem() instanceof ItemSaddle || stack.getItem() == MoCItems.horsesaddle)) {
&& (stack.getItem() instanceof ItemSaddle)) {
if (!player.capabilities.isCreativeMode) stack.shrink(1);
setRideable(true);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ public boolean processInteract(EntityPlayer player, EnumHand hand) {
return true;
}
if (!stack.isEmpty() && getIsTamed() && !getIsRideable() && (getAge() > 80)
&& (stack.getItem() instanceof ItemSaddle || stack.getItem() == MoCItems.horsesaddle)) {
&& (stack.getItem() instanceof ItemSaddle)) {
if (!player.capabilities.isCreativeMode) stack.shrink(1);
setRideable(true);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public boolean processInteract(EntityPlayer player, EnumHand hand) {

final ItemStack stack = player.getHeldItem(hand);
if (!stack.isEmpty() && getIsTamed() && (getAge() > 90 || getIsAdult()) && !getIsRideable()
&& (stack.getItem() instanceof ItemSaddle || stack.getItem() == MoCItems.horsesaddle)) {
&& (stack.getItem() instanceof ItemSaddle)) {
if (!player.capabilities.isCreativeMode) stack.shrink(1);
setRideable(true);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ public boolean processInteract(EntityPlayer player, EnumHand hand) {

final ItemStack stack = player.getHeldItem(hand);
if (!stack.isEmpty() && getIsAdult() && !getIsRideable()
&& (stack.getItem() instanceof ItemSaddle || stack.getItem() == MoCItems.horsesaddle)) {
&& (stack.getItem() instanceof ItemSaddle)) {
if (!player.capabilities.isCreativeMode) stack.shrink(1);
setRideable(true);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ public boolean processInteract(EntityPlayer player, EnumHand hand) {
}

final ItemStack stack = player.getHeldItem(hand);
if (getIsTamed() && (getType() > 1) && !stack.isEmpty() && !getIsRideable() && (stack.getItem() == MoCItems.horsesaddle || stack.getItem() instanceof ItemSaddle)) {
if (getIsTamed() && (getType() > 1) && !stack.isEmpty() && !getIsRideable() && (stack.getItem() instanceof ItemSaddle)) {
if (!player.capabilities.isCreativeMode) stack.shrink(1);
MoCTools.playCustomSound(this, SoundEvents.ENTITY_CHICKEN_EGG);
setRideable(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public boolean processInteract(EntityPlayer player, EnumHand hand) {
return true;
}

if (!stack.isEmpty() && !getIsRideable() && getAge() > 90 && this.getIsTamed() && (stack.getItem() instanceof ItemSaddle || stack.getItem() == MoCItems.horsesaddle)) {
if (!stack.isEmpty() && !getIsRideable() && getAge() > 90 && this.getIsTamed() && (stack.getItem() instanceof ItemSaddle)) {
if (!player.capabilities.isCreativeMode) stack.shrink(1);
setRideable(true);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ public boolean processInteract(EntityPlayer player, EnumHand hand) {
if (this.getType() == 60 && !getIsTamed() && isZebraRunning()) return false;

final ItemStack stack = player.getHeldItem(hand);
if (!stack.isEmpty() && !getIsRideable() && (stack.getItem() instanceof ItemSaddle || stack.getItem() == MoCItems.horsesaddle)) {
if (!stack.isEmpty() && !getIsRideable() && (stack.getItem() instanceof ItemSaddle)) {
if (!player.capabilities.isCreativeMode) stack.shrink(1);
setRideable(true);
return true;
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/drzhark/mocreatures/init/MoCRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package drzhark.mocreatures.init;

import drzhark.mocreatures.MoCConstants;
import drzhark.mocreatures.MoCreatures;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
Expand All @@ -15,6 +16,8 @@
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.registries.IForgeRegistry;

@ObjectHolder(MoCConstants.MOD_ID)
public class MoCRecipes {
Expand All @@ -37,6 +40,13 @@ public static void registerFuels(FurnaceFuelBurnTimeEvent event) {

@SubscribeEvent
public static void registerRecipes(final RegistryEvent.Register<IRecipe> event) {
IForgeRegistry<IRecipe> registry = event.getRegistry();

// Configurable craftable saddle recipe
if (MoCreatures.proxy.craftableSaddles) {
registry.register(new ShapedOreRecipe(null, Items.SADDLE, "###", "#*#", "* *", '#', Items.LEATHER, '*', Items.IRON_INGOT)
.setRegistryName(MoCConstants.MOD_ID, "crafted_saddle"));
}

GameRegistry.addSmelting(new ItemStack(MoCBlocks.ancientOre), new ItemStack(Items.DYE, 3, 15), 0.2F);
GameRegistry.addSmelting(new ItemStack(MoCBlocks.cobbledDeepWyvstone), new ItemStack(MoCBlocks.deepWyvstone), 0.1F);
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/drzhark/mocreatures/item/MoCItemHorseSaddle.java

This file was deleted.

2 changes: 2 additions & 0 deletions src/main/java/drzhark/mocreatures/proxy/MoCProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class MoCProxy implements IGuiHandler {
public boolean armorSetEffects;
public boolean attackHorses;
public boolean attackWolves;
public boolean craftableSaddles;
public boolean debug = false;
public boolean destroyDrops;
public boolean displayPetHealth;
Expand Down Expand Up @@ -262,6 +263,7 @@ public void readGlobalConfigValues() {
this.armorSetEffects = this.mocSettingsConfig.get(CATEGORY_MOC_GENERAL_SETTINGS, "ArmorSetEffects", true, "Applies potion effects when wearing full scorpion armor sets.").getBoolean(true);
this.attackHorses = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "AttackHorses", false, "Allows creatures to attack horses.").getBoolean(false);
this.attackWolves = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "AttackWolves", false, "Allows creatures to attack wolves.").getBoolean(false);
this.craftableSaddles = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "CraftableSaddles", true, "Adds a recipe to craft saddles.").getBoolean(true);
this.debug = this.mocSettingsConfig.get(CATEGORY_MOC_GENERAL_SETTINGS, "Debug", false, "Turns on verbose logging.").getBoolean(false);
this.destroyDrops = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "DestroyDrops", false, "Destroys animal drops when not killed by a player.").getBoolean(false);
this.easterEggs = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "EasterEggs", true, "Not for the more serious lore friendly players.").getBoolean(true);
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/assets/mocreatures/lang/de_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ item.hidechest.name=Felltunika
item.hidehelmet.name=Fellkappe
item.hidelegs.name=Fellhose
item.horsearmorcrystal.name=Kristallrüstung
item.horsesaddle.name=Reitsattel
item.katana.name=Ninja-Katana
item.key.name=Schlüssel
item.kittybed.name=Katzenbett
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/assets/mocreatures/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ item.hidechest.name=Hide Tunic
item.hidehelmet.name=Hide Cap
item.hidelegs.name=Hide Pants
item.horsearmorcrystal.name=Crystal Horse Armor
item.horsesaddle.name=Crafted Saddle
item.katana.name=Ninja Katana
item.key.name=Key
item.kittybed.name=Kitty Bed
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/assets/mocreatures/lang/fr_fr.lang
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ item.hidechest.name=Tunique en peau d'animal
item.hidehelmet.name=Chapeau en peau d'animal
item.hidelegs.name=Pantalon en peau d'animal
item.horsearmorcrystal.name=Armure de crystal pour monture
item.horsesaddle.name=Selle artisanale
item.katana.name=Katana
item.key.name=Clé
item.kittybed.name=Lit pour chat
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/assets/mocreatures/lang/ru_ru.lang
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ item.hidechest.name=Кираса из шкуры
item.hidehelmet.name=Шлем из шкуры
item.hidelegs.name=Поножи из шкуры
item.horsearmorcrystal.name=Кристальная горная броня
item.horsesaddle.name=Сделанное седло
item.katana.name=Катана
item.key.name=Ключ
item.kittybed.name=Кошачья кровать
Expand Down

This file was deleted.

21 changes: 0 additions & 21 deletions src/main/resources/assets/mocreatures/recipes/crafted_saddle.json

This file was deleted.

Binary file not shown.

0 comments on commit 6088115

Please sign in to comment.