Everything posted by MrRiegel
-
[1.7] register two equal fluids
hey, I want to add oil and it should be compatible with buildcraft oil. Could I play with 2 oils at the same time? And if not, how can I activate buildcraft oil if buildcraft is installed? ModFluids public class ModFluids { public static final Fluid oil = new Fluid("oil").setDensity(800) .setViscosity(10000); public static void init() { registerFluid(ModFluids.oil, "oil"); } private static void registerFluid(Fluid fluid, String fluidName) { if (!FluidRegistry.isFluidRegistered(fluidName)) { FluidRegistry.registerFluid(fluid); } fluid = FluidRegistry.getFluid(fluidName); } } ModBlocks public class ModBlocks { public static final Block oilBlock = new OilBlock(ModFluids.oil, Material.water); public static void init() { GameRegistry.registerBlock(oilBlock, "oilBlock"); } } Moditems public class ModItems { public static final Item oilBucket = new OilBucket(ModBlocks.oilBlock); public static void init() { GameRegistry.registerItem(oilBucket, "oilBucket"); FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("oil", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(oilBucket), new ItemStack(Items.bucket)); BucketHandler.INSTANCE.buckets.put(ModBlocks.oilBlock, ModItems.oilBucket); } }
-
[1.7] Is that a bug?
I have a TE class with this method: @Override public void updateEntity() { if (worldObj.isRemote) return; Vector<EntityPlayer> lis = new Vector<EntityPlayer>(); for (World w : MinecraftServer.getServer().worldServers) for (Object o : w.playerEntities) { EntityPlayer p = (EntityPlayer) o; lis.add(p); } for (EntityPlayer player : lis) { if (new Random().nextInt(5) == 2) { EntityItem ei = new EntityItem(worldObj, player.posX, player.posY, player.posZ, Mod.foodList.get(5)); worldObj.spawnEntityInWorld(ei); System.out.println("num: " + ei.getEntityItem().stackSize); } } } the foodList is initialized in postInit(FMLPostInitializationEvent event): foodList = new Vector<ItemStack>(); Iterator<Item> f = GameData.getItemRegistry().iterator(); while (f.hasNext()) { Item i = f.next(); if (i instanceof ItemFood) { ItemFood item = (ItemFood) i; if (i.getHasSubtypes()) { i.getSubItems(i, null, foodList); } else foodList.add(new ItemStack(i)); } } the output: [16:59:22] [server thread/INFO]: Player579 joined the game [16:59:23] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 1 [16:59:23] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 1 [16:59:23] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 1 [16:59:24] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 1 [16:59:24] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 1 [16:59:24] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 1 [16:59:24] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 2 [16:59:24] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 2 [16:59:24] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 2 [16:59:25] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 16 [16:59:25] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 16 [16:59:25] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 64 [16:59:25] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 64 [16:59:26] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 0 [16:59:27] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 0 [16:59:27] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 0 [16:59:27] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 0 [16:59:27] [server thread/INFO] [sTDOUT]: [mrriegel.cwacom.tile.TileTerminal:updateEntity:93]: num: 0 then the 0 is repeating. sometimes it starts with 0 or jump from 1 to 0. when I replace "Mod.foodList.get(5)" with e.g. "new ItemStack(Items.golden_apple)" everything is fine and the stacksize is 1 So, whats wrong?
-
[1.7] problem with syncing TE
hey, I need to sync TE on client and server side because changes only occur on server side. I use getDescriptionPacket() and onDataPacket(). The problem is that TE implements ISidedInventory and I cannot sync the stacks from ItemStack[] if the stack is null, but that is necessary. If I clear the inventory on server side the client doesn't care. @Override public void readFromNBT(NBTTagCompound tag) { super.readFromNBT(tag); NBTTagList invList = tag.getTagList("Inventory", Constants.NBT.TAG_COMPOUND); for (int i = 0; i < invList.tagCount(); i++) { NBTTagCompound stackTag = invList.getCompoundTagAt(i); int slot = stackTag.getByte("Slot"); if (slot >= 0 && slot < inv.length) inv[slot] = ItemStack.loadItemStackFromNBT(stackTag); } active = tag.getBoolean("active"); processing = tag.getBoolean("processing"); cooldown = tag.getInteger("cooldown"); name = tag.getString("name"); NBTTagCompound st = (NBTTagCompound) tag.getTag("stack"); stack = ItemStack.loadItemStackFromNBT(st); } @Override public void writeToNBT(NBTTagCompound tag) { super.writeToNBT(tag); NBTTagList invList = new NBTTagList(); for (int i = 0; i < inv.length; i++) { if (inv[i] != null) { NBTTagCompound stackTag = new NBTTagCompound(); stackTag.setByte("Slot", (byte) i); inv[i].writeToNBT(stackTag); invList.appendTag(stackTag); } } tag.setBoolean("active", active); tag.setBoolean("processing", processing); tag.setInteger("cooldown", cooldown); if (name != null && !name.equals("")) tag.setString("name", name); NBTTagCompound st = new NBTTagCompound(); if (stack != null) stack.writeToNBT(st); tag.setTag("stack", st); tag.setTag("Inventory", invList); } @Override public Packet getDescriptionPacket() { NBTTagCompound syncData = new NBTTagCompound(); this.writeToNBT(syncData); return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, syncData); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { readFromNBT(pkt.func_148857_g()); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); }
-
[1.7] render icon into item
hi, I want to render an texture (a png file) into an item in inventory. Rendering an item into another was easy with that. But how without an item?
-
[SOLVED][1.7] get itemstacks from item with inventory
thanks ItemStack#loadItemStackFromNBT(NBTTagCompound) is great
-
[SOLVED][1.7] get itemstacks from item with inventory
Hi, I made an item with an inventory with the aid of this tutorial http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571597-forge-1-6-4-1-8-custom-inventories-in-items-and?comment=1 Now I want to have a list of itemstack the inventory contains. But NBT can't save entire itemstacks. With stack.getTagCompound().getTagList("bag",stack.getTagCompound().getId()).getCompoundTagAt(0) I can get id,damage and stacksize but I don't know how to resolve this. thanks
-
[1.7] change item texture problem
the problem is that the nbt changes only on server side while the inventory is open. only if the inventory is closed the nbt on client side changes too. I tried to send packets in onUpdate() but it doesn't work.
-
[SOLVED][1.7] RenderItem visibility depends on angle
you are a genius thanks
-
[SOLVED][1.7] RenderItem visibility depends on angle
Hi Problem: Code: public class StoneItemRenderer extends TileEntitySpecialRenderer { private final RenderItem renderItem; public StoneItemRenderer() { renderItem = new RenderItem() { @Override public boolean shouldBob() { return false; } }; renderItem.setRenderManager(RenderManager.instance); } @Override public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float f) { if (tileEntity instanceof MazerTile) { add(tileEntity, d0 + 1.3, d1, d2 + 1.3, f, 0); add(tileEntity, d0 - 1.3, d1, d2 - 1.3, f, 1); add(tileEntity, d0 + 1.3, d1, d2 - 1.3, f, 2); add(tileEntity, d0 - 1.3, d1, d2 + 1.3, f, 3); } } private void add(TileEntity tileEntity, double d0, double d1, double d2, float f, int slot) { MazerTile tile = (MazerTile) tileEntity; GL11.glPushMatrix(); if (tile.getStackInSlot(slot) != null) { float scaleFactor = 0.85F; float rotationAngle = Minecraft.getMinecraft().gameSettings.fancyGraphics ? (float) (720.0 * (System .currentTimeMillis() & 0x3FFFL) / 0x3FFFL) : 0; EntityItem ghostEntityItem = new EntityItem(tile.getWorldObj()); ghostEntityItem.hoverStart = 0.0F; ghostEntityItem.setEntityItemStack(tile.getStackInSlot(slot)); float displacement = 0.2F; if (ghostEntityItem.getEntityItem().getItem() instanceof ItemBlock) { GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.7F, (float) d2 + 0.5F); } else { GL11.glTranslatef((float) d0 + 0.5F, (float) d1 + displacement + 0.6F, (float) d2 + 0.5F); } GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); GL11.glRotatef(rotationAngle, 0.0F, 1.0F, 0.0F); renderItem.doRender(ghostEntityItem, 0, 0, 0, 0, 0); } GL11.glPopMatrix(); } } thanks
-
[SOLVED][1.7] waila side
hey guys, I want to implement waila support. My code: public class StoneHandler implements IWailaDataProvider { @Override public NBTTagCompound getNBTData(EntityPlayerMP arg0, TileEntity arg1, NBTTagCompound arg2, World arg3, int arg4, int arg5, int arg6) { if (!(arg1 instanceof MazerTile)) { return null; } return arg2; } @Override public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { if (!(accessor.getTileEntity() instanceof MazerTile)) { return null; } MazerTile tile = (MazerTile) accessor.getTileEntity(); currenttip.add("Active: " + tile.isActive()); return currenttip; } @Override public List<String> getWailaHead(ItemStack arg0, List<String> arg1, IWailaDataAccessor arg2, IWailaConfigHandler arg3) { return arg1; } @Override public ItemStack getWailaStack(IWailaDataAccessor arg0, IWailaConfigHandler arg1) { return null; } @Override public List<String> getWailaTail(ItemStack arg0, List<String> arg1, IWailaDataAccessor arg2, IWailaConfigHandler arg3) { return arg1; } public static void callbackRegister(IWailaRegistrar registrar) { registrar.registerBodyProvider(new StoneHandler(), MazerTile.class); } } The problem I dont know how to get data from server side because waila method are only called on client side. I could use SimpleNetworkWrapper but in what class do I synchronize? Block and TileEntity classes have no onUpdate() method.
-
[1.7] change item texture problem
hey, I made a sword with an inventory with one slot. the texture of the sword depends on the containing item. @Override public IIcon getIconFromDamage(int p_77617_1_) { if (sword .getTagCompound() .getTagList(InventoryNevTool.tagName, sword.getTagCompound().getId()).getCompoundTagAt(0) .getShort("Damage") == 6) { return icon_f; } else { return itemIcon; } } but while the gui is open and changing the item, the sword icon is flickering. https://drive.google.com/file/d/0Bxk8bebSTRk-LVN5YWhIWDF0RWc/view?usp=sharing how can I stop this? container: public class ContainerNevTool extends Container { InventoryNevTool inv; public ContainerNevTool(EntityPlayer player, InventoryPlayer invPlayer, InventoryNevTool inv) { this.inv = inv; for (int i = 0; i < 1; i++) { for (int j = 0; j < 1; j++) { addSlotToContainer(new MySlot(inv, j + i * 1, 80 + j * 18, 48 + i * 18)); } } for (int i = 0; i < 3; i++) { for (int j = 0; j < 9; j++) { addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); } } for (int i = 0; i < 9; i++) { if (i == invPlayer.currentItem) addSlotToContainer(new EvilSlot(invPlayer, i, 8 + i * 18, 142)); addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142)); } } @Override public boolean canInteractWith(EntityPlayer player) { return inv.isUseableByPlayer(player); } @Override public ItemStack transferStackInSlot(EntityPlayer player, int slot) { ItemStack stack = null; Slot slotObject = (Slot) inventorySlots.get(slot); // null checks and checks if the item can be stacked (maxStackSize > 1) if (slotObject != null && slotObject.getHasStack()) { ItemStack stackInSlot = slotObject.getStack(); if (!stackInSlot.getItem().equals(ModItems.cry)) return null; stack = stackInSlot.copy(); // merges the item into player inventory since its in the tileEntity if (slot < inv.getSizeInventory()) { if (!this.mergeItemStack(stackInSlot, inv.getSizeInventory(), 36 + inv.getSizeInventory(), true)) { return null; } } // places it into the tileEntity is possible since its in the player // inventory else if (!this.mergeItemStack(stackInSlot, 0, inv.getSizeInventory(), false)) { return null; } if (stackInSlot.stackSize == 0) { slotObject.putStack(null); } else { slotObject.onSlotChanged(); } if (stackInSlot.stackSize == stack.stackSize) { return null; } slotObject.onPickupFromSlot(player, stackInSlot); } return stack; } } inventory: public class InventoryNevTool implements IInventory { private ItemStack[] inv; public static final int INV_SIZE = 1; public static String tagName = "NevTool"; ItemStack storedInv = null; public InventoryNevTool(ItemStack stack) { inv = new ItemStack[iNV_SIZE]; this.storedInv = stack; if (!storedInv.hasTagCompound()) { storedInv.setTagCompound(new NBTTagCompound()); } readFromNBT(storedInv.getTagCompound()); } public void readFromNBT(NBTTagCompound compound) { String key = tagName; if (key == null || key.equals("")) { return; } NBTTagList items = compound.getTagList(key, compound.getId()); for (int i = 0; i < items.tagCount(); ++i) { NBTTagCompound item = items.getCompoundTagAt(i); byte slot = item.getByte("Slot"); if (slot >= 0 && slot < getSizeInventory()) { inv[slot] = ItemStack.loadItemStackFromNBT(item); } } } public void writeToNBT(NBTTagCompound compound) { String key = tagName; if (key == null || key.equals("")) { return; } NBTTagList items = new NBTTagList(); for (int i = 0; i < getSizeInventory(); ++i) { if (getStackInSlot(i) != null) { NBTTagCompound item = new NBTTagCompound(); item.setByte("Slot", (byte) i); getStackInSlot(i).writeToNBT(item); items.appendTag(item); } } compound.setTag(key, items); } public static boolean isNevPick(ItemStack stack) { return stack != null && stack.getItem() == ModItems.nevpick; } @Override public int getSizeInventory() { return inv.length; } @Override public ItemStack getStackInSlot(int slot) { return inv[slot]; } @Override public ItemStack decrStackSize(int slot, int amt) { ItemStack stack = getStackInSlot(slot); if (stack != null) { if (stack.stackSize <= amt) { setInventorySlotContents(slot, null); } else { stack = stack.splitStack(amt); if (stack.stackSize == 0) { setInventorySlotContents(slot, null); } } } return stack; } @Override public ItemStack getStackInSlotOnClosing(int slot) { ItemStack stack = getStackInSlot(slot); if (stack != null) { setInventorySlotContents(slot, null); } this.markDirty(); return stack; } @Override public void setInventorySlotContents(int slot, ItemStack stack) { inv[slot] = stack; if (stack != null && stack.stackSize > getInventoryStackLimit()) { stack.stackSize = getInventoryStackLimit(); } this.markDirty(); } @Override public String getInventoryName() { return storedInv.getDisplayName(); } @Override public boolean hasCustomInventoryName() { return false; } @Override public int getInventoryStackLimit() { return 1; } @Override public void markDirty() { for (int i = 0; i < getSizeInventory(); ++i) { if (getStackInSlot(i) != null && getStackInSlot(i).stackSize == 0) inv[i] = null; } writeToNBT(storedInv.getTagCompound()); } @Override public boolean isUseableByPlayer(EntityPlayer player) { ItemStack stack = player.getCurrentEquippedItem(); return stack != null && (stack.getItem() == ModItems.nevpick || stack.getItem() == ModItems.nevshovel || stack.getItem() == ModItems.nevaxe || stack .getItem() == ModItems.nevsword); } @Override public void openInventory() { } @Override public void closeInventory() { } @Override public boolean isItemValidForSlot(int slot, ItemStack stack) { return false; } }
-
[SOLVED][1.7] How to forbid enchanting
Hey guys, I made new tools and I want to make them unenchantable. By overriding getItemEnchantability() with return 0; I can make them unenchantable in the enchanting table but enchanting with books works anyway
-
Is there event when player kills entity?
@SubscribeEvent public void kill(LivingDeathEvent event) { if (event.source.getSourceOfDamage() instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) source.getSourceOfDamage(); doSomethingWithPlayer(player); } }
-
Brief Question
What is more efficient in case that equals gives true? if(!world.getBlock(x,y,z).equals(Blocks.example){ world.setBlock(x,y,z,Blocks.example); } or world.setBlock(x,y,z,Blocks.example);
-
[1.7] Persistence with IExtendedEntityProperties
It works! I would not have thought that it is so easy. thank you
-
[1.7] Persistence with IExtendedEntityProperties
hello, I want to save data to player and I use IEEP. So far, so good. The data survive logout and death. But when I go from death screen directly to title screen the data is lost. How can I fix this? IEEP: public class PlayerInformation implements IExtendedEntityProperties { public final static String EXT_PROP_NAME = "PlayerInformation"; private final EntityPlayer player; private HashMap<String, Boolean> layerBools = new HashMap<String, Boolean>(); private HashMap<String, Boolean> questBools = new HashMap<String, Boolean>(); private HashMap<String, Integer> questNums = new HashMap<String, Integer>(); public PlayerInformation(EntityPlayer player) { this.player = player; for (String s : BlockedLayers.names) { questBools.put(s, false); questNums.put(s + "Num", 0); } for (String s : BlockedLayers.layer) { layerBools.put(s, false); } } public static final void register(EntityPlayer player) { player.registerExtendedProperties(PlayerInformation.EXT_PROP_NAME, new PlayerInformation(player)); } public static final PlayerInformation get(EntityPlayer player) { return (PlayerInformation) player.getExtendedProperties(EXT_PROP_NAME); } @Override public void saveNBTData(NBTTagCompound compound) { NBTTagCompound properties = new NBTTagCompound(); for (Entry<String, Boolean> entry : layerBools.entrySet()) { properties.setBoolean(entry.getKey(), entry.getValue()); } for (Entry<String, Boolean> entry : questBools.entrySet()) { properties.setBoolean(entry.getKey(), entry.getValue()); } for (Entry<String, Integer> entry : questNums.entrySet()) { properties.setInteger(entry.getKey(), entry.getValue()); } compound.setTag(EXT_PROP_NAME, properties); } @Override public void loadNBTData(NBTTagCompound compound) { NBTTagCompound properties = (NBTTagCompound) compound .getTag(EXT_PROP_NAME); for (Entry<String, Boolean> entry : layerBools.entrySet()) { entry.setValue(properties.getBoolean(entry.getKey())); } for (Entry<String, Boolean> entry : questBools.entrySet()) { entry.setValue(properties.getBoolean(entry.getKey())); } for (Entry<String, Integer> entry : questNums.entrySet()) { entry.setValue(properties.getInteger(entry.getKey())); } } private static final String getSaveKey(EntityPlayer player) { return player.getCommandSenderName() + ":" + EXT_PROP_NAME; } public static final void loadProxyData(EntityPlayer player) { PlayerInformation playerData = PlayerInformation.get(player); NBTTagCompound savedData = ServerProxy .getEntityData(getSaveKey(player)); if (savedData != null) { playerData.loadNBTData(savedData); } } public static final void saveProxyData(EntityPlayer player) { PlayerInformation playerData = PlayerInformation.get(player); NBTTagCompound savedData = new NBTTagCompound(); playerData.saveNBTData(savedData); ServerProxy.storeEntityData(getSaveKey(player), savedData); } @Override public void init(Entity entity, World world) { } public HashMap<String, Boolean> getLayerBools() { return layerBools; } public HashMap<String, Boolean> getQuestBools() { return questBools; } public HashMap<String, Integer> getQuestNums() { return questNums; } } SyncHandler: public class SyncHandler { @SubscribeEvent public void onLivingDeathEvent(LivingDeathEvent event) { if (!event.entity.worldObj.isRemote && event.entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entity; NBTTagCompound playerData = new NBTTagCompound(); ((PlayerInformation) (player .getExtendedProperties(PlayerInformation.EXT_PROP_NAME))) .saveNBTData(playerData); ServerProxy.storeEntityData(player.getCommandSenderName(), playerData); PlayerInformation.saveProxyData((EntityPlayer) event.entity); } } @SubscribeEvent public void onEntityConstructing(EntityConstructing event) { if (event.entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entity; if (PlayerInformation.get((EntityPlayer) event.entity) == null) { PlayerInformation.register(player); } } } @SubscribeEvent public void respawn(EntityJoinWorldEvent event) { if (!event.entity.worldObj.isRemote && event.entity instanceof EntityPlayer && !event.entity.isDead) { EntityPlayer player = (EntityPlayer) event.entity; NBTTagCompound playerData = ServerProxy.getEntityData(player .getCommandSenderName()); if (playerData != null) { (player.getExtendedProperties(PlayerInformation.EXT_PROP_NAME)) .loadNBTData(playerData); } PlayerInformation props = PlayerInformation.get(player); } } } Proxy: public class ServerProxy extends CommonProxy implements IGuiHandler { private static final Map<String, NBTTagCompound> extendedEntityData = new HashMap<String, NBTTagCompound>(); @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; } public static void storeEntityData(String name, NBTTagCompound compound) { extendedEntityData.put(name, compound); } public static NBTTagCompound getEntityData(String name) { return extendedEntityData.remove(name); } }
-
[1.7] Reading names from file
ok thanks
-
[1.7] Reading names from file
- [1.7] Reading names from file
I did it with getDeclaredFields() not handwritten- [1.7] Reading names from file
too late https://github.com/MrRiegel/Blocked-Layers/blob/1.7.10/src/main/java/mrriegel/blockedlayers/utility/Hashmaps.java but thanks- [1.7] Reading names from file
Thats the way I want to avoid. But if there is no other possibility, I go for it. Yay, 170 Items,170 Blocks, 30 Entities. That would be very easy. </irony> Thanks- [1.7] Reading names from file
hey there! here is my problem: I want to make a little quest mod, where the user can write own quests to a file with a simple syntax("addQuest(kill,zombie,5)"). The parsing of the file is easy, but how can I get the class EntityZombie from the string "zombie" or the Items.apple from the string "apple"? It works with Items.class.getDeclaredFields() or ClassLoader, but ONLY in eclipse because the item names in "real life" are e.g. field_345_3. Thanks - [1.7] Reading names from file
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.