Premier commit - Extrait du pauvre jar après perte des sources

This commit is contained in:
Mysaa
2021-05-28 22:57:57 +02:00
commit 29ef10e9f9
54 changed files with 1355 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
package com.bernard.torch.init;
public class ClientProxy
extends CommonProxy
{
public void registerRenders() {}
}
@@ -0,0 +1,80 @@
/* */ package com.bernard.torch.init;
/* */
/* */ import java.util.HashMap;
/* */ import java.util.Map;
/* */ import net.minecraft.block.Block;
/* */ import net.minecraft.item.Item;
/* */ import net.minecraft.item.ItemStack;
/* */
/* */
/* */
/* */ public class CoalStickAndTorchesRegister
/* */ {
/* 13 */ private static Map<Item, Integer[]> registered = new HashMap();
/* */ private static final int coalValue = 0;
/* */ private static final int stickValue = 1;
/* */ private static final int torchValue = 2;
/* */
/* */ public static void registerCoal(Item i, int value) {
/* 19 */ registered.put(i, new Integer[] { Integer.valueOf(0), Integer.valueOf(Math.abs(value)) });
/* */ }
/* */
/* 22 */ public static void registerCoal(Block b, int value) { registered.put(Item.getItemFromBlock(b), new Integer[] { Integer.valueOf(0), Integer.valueOf(Math.abs(value)) }); }
/* */
/* */ public static void registerCoal(ItemStack s, int value) {
/* 25 */ registered.put(s.getItem(), new Integer[] { Integer.valueOf(0), Integer.valueOf(Math.abs(value)) });
/* */ }
/* */
/* 28 */ public static void registerStick(Item i, int value) { registered.put(i, new Integer[] { Integer.valueOf(1), Integer.valueOf(Math.abs(value)) }); }
/* */
/* */ public static void registerStick(Block b, int value) {
/* 31 */ registered.put(Item.getItemFromBlock(b), new Integer[] { Integer.valueOf(1), Integer.valueOf(Math.abs(value)) });
/* */ }
/* */
/* 34 */ public static void registerStick(ItemStack s, int value) { registered.put(s.getItem(), new Integer[] { Integer.valueOf(1), Integer.valueOf(Math.abs(value)) }); }
/* */
/* */ public static void registerTorch(Item i, int value) {
/* 37 */ registered.put(i, new Integer[] { Integer.valueOf(2), Integer.valueOf(Math.abs(value)) });
/* */ }
/* */
/* 40 */ public static void registerTorch(Block b, int value) { registered.put(Item.getItemFromBlock(b), new Integer[] { Integer.valueOf(2), Integer.valueOf(Math.abs(value)) }); }
/* */
/* */
/* 43 */ public static void registerTorch(ItemStack s, int value) { registered.put(s.getItem(), new Integer[] { Integer.valueOf(2), Integer.valueOf(Math.abs(value)) }); }
/* */
/* */ public static boolean isCoal(Item i) {
/* 46 */ if (!registered.containsKey(i))
/* 47 */ return false;
/* 48 */ return ((Integer[])registered.get(i))[0].intValue() == 0;
/* */ }
/* */
/* 51 */ public static boolean isRegistered(Item i) { return registered.containsKey(i); }
/* */
/* */ public static boolean isStick(Item i) {
/* 54 */ if (!registered.containsKey(i))
/* 55 */ return false;
/* 56 */ return ((Integer[])registered.get(i))[0].intValue() == 1;
/* */ }
/* */
/* 59 */ public static boolean isTorch(Item i) { if (!registered.containsKey(i))
/* 60 */ return false;
/* 61 */ return ((Integer[])registered.get(i))[0].intValue() == 2;
/* */ }
/* */
/* 64 */ public static int getCoalValue(Item i) { if (!isCoal(i))
/* 65 */ return 0;
/* 66 */ return ((Integer[])registered.get(i))[1].intValue();
/* */ }
/* */
/* 69 */ public static int getStickValue(Item i) { if (!isStick(i))
/* 70 */ return 0;
/* 71 */ return ((Integer[])registered.get(i))[1].intValue();
/* */ }
/* */
/* 74 */ public static int getTorchValue(Item i) { if (!isTorch(i))
/* 75 */ return 0;
/* 76 */ return ((Integer[])registered.get(i))[1].intValue();
/* */ }
/* */ }
+8
View File
@@ -0,0 +1,8 @@
package com.bernard.torch.init;
public class CommonProxy
{
public void registerRenders() {}
}
+22
View File
@@ -0,0 +1,22 @@
/* */ package com.bernard.torch.init;
/* */
/* */ import com.bernard.torch.blocks.TorchRechargerBlock;
/* */ import com.bernard.torch.blocks.itemblocs.TorchRechargerItemBlock;
/* */ import com.bernard.torch.blocks.tileentities.TorchRechargerTileEntity;
/* */ import cpw.mods.fml.common.registry.GameRegistry;
/* */ import net.minecraft.block.Block;
/* */
/* */
/* */ public class TorchBlocks
/* */ {
/* */ public static Block torchRecharger;
/* */
/* */ public static void init()
/* */ {
/* 16 */ torchRecharger = new TorchRechargerBlock().setUnlocalizedName("torch_recharger");
/* 17 */ GameRegistry.registerBlock(torchRecharger, TorchRechargerItemBlock.class, "torch_recharger");
/* 18 */ GameRegistry.registerTileEntity(TorchRechargerTileEntity.class, "torch_mod:torch_recharger_te");
/* */ }
/* */ }
+21
View File
@@ -0,0 +1,21 @@
/* */ package com.bernard.torch.init;
/* */
/* */ import com.bernard.torch.items.TorchAmulet;
/* */ import cpw.mods.fml.common.registry.GameRegistry;
/* */ import net.minecraft.creativetab.CreativeTabs;
/* */ import net.minecraft.item.Item;
/* */
/* */
/* */
/* */ public class TorchItems
/* */ {
/* */ public static Item torchAmulet;
/* */
/* */ public static void init()
/* */ {
/* 16 */ torchAmulet = new TorchAmulet().setUnlocalizedName("torch_amulet").setTextureName("torch_mod:torch_amulet").setCreativeTab(CreativeTabs.tabTools);
/* 17 */ GameRegistry.registerItem(torchAmulet, "torch_amulet");
/* */ }
/* */ }