Jump to content

BaXMultigaming

Members
  • Posts

    29
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

BaXMultigaming's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Ok i will check that classes. I probably got it and found line which i need to add : @SideOnly(Side.CLIENT) public void initModel() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); }
  2. Hello, I am working on updating my mod to 1.10.2 from 1.7.10, but i got stuck in one position. Here is code from my mod in 1.7.10 version which i would like to update : public abstract class ItemsFirst extends Item { protected final int ITEM_MAX; private final String subid; public ItemsFirst(String subId, int max) { super(); subid = subId; ITEM_MAX = max; setHasSubtypes(true); setUnlocalizedName(ModThings.MODID + "_" + subid); } @SideOnly(Side.CLIENT) private IIcon[] icons; @SideOnly(Side.CLIENT) @Override public void registerIcons(IIconRegister register) { icons = new IIcon[iTEM_MAX]; for (int i = 0; i < ITEM_MAX; i++) { icons[i] = register.registerIcon(ModThings.MODID + ':' + subid + '/' + i); } } @Override public String getUnlocalizedName(ItemStack is) { return super.getUnlocalizedName() + "_" + is.getItemDamage(); } @Override @SideOnly(Side.CLIENT) public IIcon getIconFromDamage(int dv) { if ((dv >= 0) && (dv < ITEM_MAX)) { return icons[dv]; } return null; } @SideOnly(Side.CLIENT) @Override public void getSubItems(Item item, CreativeTabs tab, List list) { for (int i = 0; i < ITEM_MAX; i++) { list.add(new ItemStack(this, 1, i)); } } } public class LootsOfItems extends ItemsFirst { public LootsOfItems() { super("items", 28); } } Here is the code which i made already on 1.10.2: public class ItemThings extends Item implements ItemModelRegister { protected String name; protected int liczba; public ItemThings(String name, int liczba) { this.name = name; this.liczba = liczba; setUnlocalizedName(ModThings.MODID + "_" + name); setRegistryName(name); setHasSubtypes(true); setCreativeTab(ThingsMod.creativeTab); } @Override public void registerItemModel(Item item) { ThingsMod.proxy.registerThingNormal(item, 0, name); } @Override public ItemThings setCreativeTab(CreativeTabs tab) { super.setCreativeTab(tab); return this; } @SideOnly(Side.CLIENT) @Override public void getSubItems(Item item, CreativeTabs tab, List list) { for (int i = 0; i < liczba; i++) { list.add(new ItemStack(this, 1, i)); } } @Override public String getUnlocalizedName(ItemStack is) { return super.getUnlocalizedName() + "_" + is.getItemDamage(); } } public interface ItemModelRegister { void registerItemModel(Item item); } public class ItemThings extends Item implements ItemModelRegister { protected String name; protected int liczba; public ItemThings(String name, int liczba) { this.name = name; this.liczba = liczba; setUnlocalizedName("ThingsMod_" + name); setRegistryName(name); setHasSubtypes(true); setCreativeTab(ThingsMod.creativeTab); } @Override public void registerItemModel(Item item) { ThingsMod.proxy.registerThingNormal(item, 0, name); } @Override public ItemThings setCreativeTab(CreativeTabs tab) { super.setCreativeTab(tab); return this; } @SideOnly(Side.CLIENT) @Override public void getSubItems(Item item, CreativeTabs tab, List list) { for (int i = 0; i < liczba; i++) { list.add(new ItemStack(this, 1, i)); } } @Override public String getUnlocalizedName(ItemStack is) { return super.getUnlocalizedName() + "_" + is.getItemDamage(); } } public class ItemNormal extends ItemThings { private String ItemName; public ItemNormal(String name, String ItemName, int liczba) { super(ItemName, liczba); maxStackSize = 64; this.ItemName = ItemName; } } Here is my registry class 1.10.2: public class ManagerItems { public static ItemThings ItemNormal; public static void init() { ItemNormal = register(new ItemNormal("ItemThingNormal", "ItemThingNormal", 3)); } private static <T extends Item> T register(T item) { GameRegistry.register(item); if (item instanceof ItemModelRegister) { ((ItemModelRegister)item).registerItemModel(item); } return item; } } Can you take a look and tell me what should i change or add to make that it will load specify in minecraft 1.10.2 texture for specify number of sub item? Or maybe you have idea how to just update 1.7.10 code to work fine in 1.10.2? Sorry for my english but you should know what i am talking about
  3. Can't i workaround it? There is no other way to do it?
  4. Hey, When i type in cmd command "gradlew setupDecompWorkspace" and the percentage reaches 56% i have problem with decompile MC. In versions 1.7.10 and in older versions, I did not have this problem. I am trying to to setup Workspace on computer with 2GB ram. Is that the problem?
  5. Hey, How can i make that onBlockActivated it will pop up for example word "hello"? I have also question how can i make custom gui for block?
  6. Hey, is there any way to add for the block description like it is for the item? Sorry for my English. BaX
  7. Yee i know, it work, but i am interested where can i read about canPlaceOn method
  8. I know also there is a method in command block "canPlaceON" or something like that. Where can i find that?
  9. Hey, I made a mod with 2 custom simple blocks, but i was thinking how can i make that for example Block numer 2 can only be placed on Block numer 1 and on no other block. I am also interested how can i make a chat message for the block breaker for example when player break a Block number 2 it will show a message on the chat only for the breaker 'Hey its me' ?? Sorry for my English. BaX
  10. Ok thanks now i have everything what i wanted
  11. Because i want to make something like "Sticker" without any frames around. But can you explain to me how did you do that? You just used ItemFrame to hang it, or you used ItemFrame code? And in your case you first hang frame than clock into the frame or just you hang clock without any frame? Sorry for my english.
  12. Yee i know thanks for help
  13. Ohh that is sad Okey i will try to remake all my items to Entity
  14. Hey, I was thinking about making my items on the mod "hang able" for example my custom steak, but i have question is there any option to make that without making Item EntityItem? I know that in minecraft there are EntityHanging and ItemHangingEntity classes but i don't know if it is possible to make non-Entity hang able Item? Sorry for my english.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.