mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 04:32:23 +00:00
Flatten chakrams
This commit is contained in:
1 parent
1d997c7f3b
commit
e5aa9339df
19 files changed
+42
-64
No files matched your search
@@ -237,7 +237,8 @@ public class ClientProxy implements IProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityManaStorm.class, RenderManaStorm::new);
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBabylonWeapon.class, RenderBabylonWeapon::new);
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityThornChakram.class, renderManager -> new RenderSnowballStack<>(renderManager, ModItems.thornChakram, Minecraft.getMinecraft().getRenderItem(), entity -> new ItemStack(ModItems.thornChakram, 1, entity.isFire() ? 1 : 0)));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityThornChakram.class, renderManager -> new RenderSnowballStack<>(renderManager, ModItems.thornChakram, Minecraft.getMinecraft().getRenderItem(),
|
||||
entity -> entity.isFire() ? new ItemStack(ModItems.flareChakram) : new ItemStack(ModItems.thornChakram)));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityVineBall.class, renderManager -> new RenderSnowball<>(renderManager, ModItems.vineBall, Minecraft.getMinecraft().getRenderItem()));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEnderAirBottle.class, renderManager -> new RenderSnowball<>(renderManager, ModItems.enderAirBottle, Minecraft.getMinecraft().getRenderItem()));
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import javax.annotation.Nonnull;
|
||||
public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
|
||||
public static final BotaniaCreativeTab INSTANCE = new BotaniaCreativeTab();
|
||||
NonNullList<ItemStack> list;
|
||||
private NonNullList<ItemStack> list;
|
||||
|
||||
public BotaniaCreativeTab() {
|
||||
super(LibMisc.MOD_ID);
|
||||
@@ -37,15 +37,9 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
setBackgroundImageName(LibResources.GUI_CREATIVE);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public ItemStack getIconItemStack() {
|
||||
return new ItemStack(ModItems.lexicon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getTabIconItem() {
|
||||
return getIconItemStack();
|
||||
return new ItemStack(ModItems.lexicon);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -222,6 +216,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addItem(ModItems.elementiumBoots);
|
||||
addItem(ModItems.terraSword);
|
||||
addItem(ModItems.thornChakram);
|
||||
addItem(ModItems.flareChakram);
|
||||
addItem(ModItems.terraPick);
|
||||
addItem(ModItems.terraAxe);
|
||||
addItem(ModItems.temperanceStone);
|
||||
@@ -404,7 +399,6 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
}
|
||||
|
||||
private void addBlock(Block block) {
|
||||
ItemStack stack = new ItemStack(block);
|
||||
block.getSubBlocks(this, list);
|
||||
}
|
||||
|
||||
|
||||
@@ -630,8 +630,8 @@ public final class ModCraftingRecipes {
|
||||
recipeSmeltRod = ModItems.smeltRod.getRegistryName();
|
||||
recipeWorldSeed = ModItems.worldSeed.getRegistryName();
|
||||
recipeSpellCloth = ModItems.spellCloth.getRegistryName();
|
||||
recipeThornChakram = path("thornchakram_0");
|
||||
recipeFireChakram = path("thornchakram_1");
|
||||
recipeThornChakram = ModItems.thornChakram.getRegistryName();
|
||||
recipeFireChakram = ModItems.flareChakram.getRegistryName();
|
||||
recipeLivingwoodBow = ModItems.livingwoodBow.getRegistryName();
|
||||
recipeCrystalBow = ModItems.crystalBow.getRegistryName();
|
||||
recipeTemperanceStone = ModItems.temperanceStone.getRegistryName();
|
||||
|
||||
@@ -124,7 +124,9 @@ public class EntityThornChakram extends EntityThrowable {
|
||||
}
|
||||
|
||||
private ItemStack getItemStack() {
|
||||
return !stack.isEmpty() ? stack.copy() : new ItemStack(ModItems.thornChakram, 1, isFire() ? 1 : 0);
|
||||
return !stack.isEmpty()
|
||||
? stack.copy()
|
||||
: isFire() ? new ItemStack(ModItems.flareChakram) : new ItemStack(ModItems.thornChakram);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,6 +31,13 @@ public class FlattenItems implements IFixableData {
|
||||
}
|
||||
});
|
||||
LOOKUP.put("botania:quartz", i -> LibMisc.MOD_ID + ":" + LibItemNames.QUARTZ_NAMES[i % LibItemNames.QUARTZ_NAMES.length]);
|
||||
LOOKUP.put("botania:thornchakram", i -> {
|
||||
if(i == 1) {
|
||||
return LibMisc.MOD_ID + ":" + LibItemNames.FLARE_CHAKRAM;
|
||||
} else {
|
||||
return LibMisc.MOD_ID + ":" + LibItemNames.THORN_CHAKRAM;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,44 +10,23 @@
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.client.core.handler.ModelHandler;
|
||||
import vazkii.botania.common.entity.EntityThornChakram;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ItemThornChakram extends ItemMod {
|
||||
|
||||
public ItemThornChakram() {
|
||||
super(LibItemNames.THORN_CHAKRAM);
|
||||
public ItemThornChakram(String name) {
|
||||
super(name);
|
||||
setMaxStackSize(6);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStack> list) {
|
||||
if(isInCreativeTab(tab)) {
|
||||
for(int i = 0; i < 2; i++)
|
||||
list.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return super.getUnlocalizedName() + stack.getItemDamage();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@@ -60,7 +39,8 @@ public class ItemThornChakram extends ItemMod {
|
||||
copy.setCount(1);
|
||||
EntityThornChakram c = new EntityThornChakram(world, player, copy);
|
||||
c.setHeadingFromThrower(player, player.rotationPitch, player.rotationYaw, 0.0F, 1.5F, 1.0F);
|
||||
c.setFire(stack.getItemDamage() != 0);
|
||||
if(stack.getItem() == ModItems.flareChakram)
|
||||
c.setFire(true);
|
||||
world.spawnEntity(c);
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_ARROW_SHOOT, SoundCategory.PLAYERS, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
stack.shrink(1);
|
||||
@@ -69,10 +49,4 @@ public class ItemThornChakram extends ItemMod {
|
||||
return ActionResult.newResult(EnumActionResult.SUCCESS, stack);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerModels() {
|
||||
ModelHandler.registerItemAppendMeta(this, 2, LibItemNames.THORN_CHAKRAM);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -227,7 +227,8 @@ public final class ModItems {
|
||||
public static final Item smeltRod = new ItemSmeltRod();
|
||||
public static final Item worldSeed = new ItemWorldSeed();
|
||||
public static final Item spellCloth = new ItemSpellCloth();
|
||||
public static final Item thornChakram = new ItemThornChakram();
|
||||
public static final Item thornChakram = new ItemThornChakram(LibItemNames.THORN_CHAKRAM);
|
||||
public static final Item flareChakram = new ItemThornChakram(LibItemNames.FLARE_CHAKRAM);
|
||||
public static final Item overgrowthSeed = new ItemOvergrowthSeed();
|
||||
public static final Item craftPattern = new ItemCraftPattern();
|
||||
public static final Item ancientWill = new ItemAncientWill();
|
||||
@@ -413,6 +414,7 @@ public final class ModItems {
|
||||
r.register(worldSeed);
|
||||
r.register(spellCloth);
|
||||
r.register(thornChakram);
|
||||
r.register(flareChakram);
|
||||
r.register(overgrowthSeed);
|
||||
r.register(craftPattern);
|
||||
r.register(ancientWill);
|
||||
|
||||
@@ -122,7 +122,8 @@ public final class LibItemNames {
|
||||
public static final String SMELT_ROD = "smeltRod";
|
||||
public static final String WORLD_SEED = "worldSeed";
|
||||
public static final String SPELL_CLOTH = "spellCloth";
|
||||
public static final String THORN_CHAKRAM = "thornChakram";
|
||||
public static final String THORN_CHAKRAM = "thorn_chakram";
|
||||
public static final String FLARE_CHAKRAM = "flare_chakram";
|
||||
public static final String OVERGROWTH_SEED = "overgrowthSeed";
|
||||
public static final String CRAFT_PATTERN = "craftPattern";
|
||||
public static final String ANCIENT_WILL = "ancientWill";
|
||||
|
||||
@@ -1491,8 +1491,8 @@ item.botania:cobbleRod.name=Rod of the Depths
|
||||
item.botania:smeltRod.name=Rod of the Molten Core
|
||||
item.botania:worldSeed.name=World Seed
|
||||
item.botania:spellCloth.name=Spellbinding Cloth
|
||||
item.botania:thornChakram0.name=Thorn Chakram
|
||||
item.botania:thornChakram1.name=Flare Chakram
|
||||
item.botania:thorn_chakram.name=Thorn Chakram
|
||||
item.botania:flare_chakram.name=Flare Chakram
|
||||
item.botania:overgrowthSeed.name=Overgrowth Seed
|
||||
item.botania:craftPattern0.name=Crafting Pattern #1: 1x1
|
||||
item.botania:craftPattern1.name=Crafting Pattern #2: 2x2
|
||||
|
||||
@@ -1276,8 +1276,8 @@ item.botania:cobbleRod.name=深淵の杖
|
||||
item.botania:smeltRod.name=融解核の杖
|
||||
item.botania:worldSeed.name=世界の種
|
||||
item.botania:spellCloth.name=呪文が織り込まれた布
|
||||
item.botania:thornChakram0.name=棘のチャクラム
|
||||
item.botania:thornChakram1.name=炎のチャクラム
|
||||
item.botania:thorn_chakram.name=棘のチャクラム
|
||||
item.botania:flare_chakram.name=炎のチャクラム
|
||||
item.botania:overgrowthSeed.name=育ちすぎた種
|
||||
item.botania:craftPattern0.name=クラフトパターン #1: 1x1
|
||||
item.botania:craftPattern1.name=クラフトパターン #2: 2x2
|
||||
|
||||
@@ -1210,8 +1210,8 @@ item.botania:cobbleRod.name=깊이의 막대
|
||||
item.botania:smeltRod.name=주조의 막대
|
||||
item.botania:worldSeed.name=세계의 씨앗
|
||||
item.botania:spellCloth.name=마음을 사로잡는 옷감
|
||||
item.botania:thornChakram0.name=가시 차크람
|
||||
item.botania:thornChakram1.name=Flare Chakram
|
||||
item.botania:thorn_chakram.name=가시 차크람
|
||||
item.botania:flare_chakram.name=Flare Chakram
|
||||
item.botania:overgrowthSeed.name=과성장 씨앗
|
||||
item.botania:craftPattern0.name=제작 패턴 #1: 1x1
|
||||
item.botania:craftPattern1.name=제작 패턴 #2: 2x2
|
||||
|
||||
@@ -1343,8 +1343,8 @@ item.botania:cobbleRod.name=Staf van de Diepte
|
||||
item.botania:smeltRod.name=Staf van de Gesmolten Kern
|
||||
item.botania:worldSeed.name=Wereldzaad
|
||||
item.botania:spellCloth.name=Betoveringsdoek
|
||||
item.botania:thornChakram0.name=Doorn van Chakram
|
||||
item.botania:thornChakram1.name=Vlam van Chakram
|
||||
item.botania:thorn_chakram.name=Doorn van Chakram
|
||||
item.botania:flare_chakram.name=Vlam van Chakram
|
||||
item.botania:overgrowthSeed.name=Overwoekeringszaad
|
||||
item.botania:craftPattern0.name=Vervaardigingspatroon #1: 1x1
|
||||
item.botania:craftPattern1.name=Vervaardigingspatroon #2: 2x2
|
||||
|
||||
@@ -1494,7 +1494,7 @@ item.botania:smeltRod.name=Cajado do Núcleo Derretido
|
||||
item.botania:worldSeed.name=Semente do Mundo
|
||||
item.botania:spellCloth.name=Tecido Encantado
|
||||
item.botania:thornChakram.name=Chakram Espinhento
|
||||
item.botania:thornChakram1.name=Chakram Flamejante
|
||||
item.botania:flare_chakram.name=Chakram Flamejante
|
||||
item.botania:overgrowthSeed.name=Semente do super-crescimento
|
||||
item.botania:craftPattern0.name=Padrão de Criação #1: 1x1
|
||||
item.botania:craftPattern1.name=Padrão de Criação #2: 2x2
|
||||
|
||||
@@ -1491,8 +1491,8 @@ item.botania:cobbleRod.name=深渊法杖
|
||||
item.botania:smeltRod.name=炽心法杖
|
||||
item.botania:worldSeed.name=世界之种
|
||||
item.botania:spellCloth.name=封印之布
|
||||
item.botania:thornChakram0.name=荆棘飞轮
|
||||
item.botania:thornChakram1.name=闪耀飞轮
|
||||
item.botania:thorn_chakram.name=荆棘飞轮
|
||||
item.botania:flare_chakram.name=闪耀飞轮
|
||||
item.botania:overgrowthSeed.name=增生之种
|
||||
item.botania:craftPattern0.name=合成模板#1: 1x1
|
||||
item.botania:craftPattern1.name=合成模板#2: 2x2
|
||||
|
||||
@@ -1456,8 +1456,8 @@ item.botania:cobbleRod.name=深淵法杖
|
||||
item.botania:smeltRod.name=熾心法杖
|
||||
item.botania:worldSeed.name=世界之種
|
||||
item.botania:spellCloth.name=封印之布
|
||||
item.botania:thornChakram0.name=荊棘飛輪
|
||||
item.botania:thornChakram1.name=閃耀飛輪
|
||||
item.botania:thorn_chakram.name=荊棘飛輪
|
||||
item.botania:flare_chakram.name=閃耀飛輪
|
||||
item.botania:overgrowthSeed.name=增生之種
|
||||
item.botania:craftPattern0.name=合成模板#1: 1x1
|
||||
item.botania:craftPattern1.name=合成模板#2: 2x2
|
||||
|
||||
File renamed without changes.
File renamed without changes.
+2
-4
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"result": {
|
||||
"item": "botania:thornchakram",
|
||||
"data": 1,
|
||||
"item": "botania:flare_chakram",
|
||||
"count": 2
|
||||
},
|
||||
"pattern": [
|
||||
@@ -18,8 +17,7 @@
|
||||
"item": "minecraft:blaze_powder"
|
||||
},
|
||||
"C": {
|
||||
"item": "botania:thornchakram",
|
||||
"data": 0
|
||||
"item": "botania:thorn_chakram"
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"result": {
|
||||
"item": "botania:thornchakram",
|
||||
"data": 0,
|
||||
"item": "botania:thorn_chakram",
|
||||
"count": 2
|
||||
},
|
||||
"pattern": [
|
||||
Reference in new issue
Block a user