
Everything posted by Cadiboo
-
[SOLVED] GameRegistry.ObjectHolder method-based initialisation
@diesieben07 I'll do that then, thanks!
-
[SOLVED] GameRegistry.ObjectHolder method-based initialisation
so your saying that I need to move all my Item = new Item() s into RegistryEvent.Register<Item> event
-
[SOLVED] GameRegistry.ObjectHolder method-based initialisation
Do you know why? I call setRegistryName(MOD_ID, name); does this change this?
-
[SOLVED] GameRegistry.ObjectHolder method-based initialisation
I've never had any problems doing this, and I mis-spoke, this is how I am creating them, not how I'm registering them. Registration is done this way @SubscribeEvent public static void registerItems(final RegistryEvent.Register<Item> event) { event.getRegistry().registerAll(cadiboo.wiptech.init.Items.ITEMS); //... blocks & ore dict } Does this still break stuff? I've never had a single problem with this method.
-
[SOLVED] GameRegistry.ObjectHolder method-based initialisation
Personally, I think the first way is great because it allows you to instantiate the same class multiple times with different names. Isn't this the ultimate reduction of code? for example over half my items are instantiated in this way public static final ItemBase TITANIUM_NUGGET = new ItemBase("titanium_nugget").setNugget().setBeaconPayment(); Or even this way public static final ItemTool COPPER_SHOVEL = new ItemTool("copper_shovel", ItemTool.COPPER, ItemTool.SPADE_EFFECTIVE_ON, ToolTypes.SHOVEL); this allows me to have 1 class for all my tools, 1 class for all my armor, 1 class for all my normal items (ingots, nuggets etc.) and very few other classes
-
[SOLVED] GameRegistry.ObjectHolder method-based initialisation
yeah it is an odd way to do it, but it places all your registration logic in one file. Whats wrong with putting public Blah() { super(); this.setRegistryName(new ResourceLocation(Reference.ID, "blah")); this.setUnlocalizedName("blah"); } in every class?
-
[SOLVED] GameRegistry.ObjectHolder method-based initialisation
I don't know if this is what you were looking for but this is how I instantiate my items public class ModItems { public static final ItemFlamethrower FLAMETHROWER = new ItemFlamethrower("flamethrower"); public static final ItemHammer HAMMER = new ItemHammer("hammer"); public static final ItemRailgun RAILGUN = new ItemRailgun("railgun"); public static final ItemCoilgun COILGUN = new ItemCoilgun("coilgun"); public static final ItemPlasmagun PLASMA_GUN = new ItemPlasmagun("plasmagun"); public static final Item[] ITEMS = { FLAMETHROWER, HAMMER, RAILGUN, COILGUN, PLASMA_GUN }; }
-
[1.12.2 Eclipse] Making a player drop their armor when custom mob attacks them.
are you 100% sure you are running in Debug mode and not normal mode?
-
Server Watchdog - Timeout Value is negative
This is a known bug, but I get it about 2/3 times I launch the Dedicated server (usually in Eclipse Workspace, usually in debug mode), thought that these screenshots might help Log
-
My Minecraft Crash
1.7.10 is no longer supported on this forum - Update to a more recent version for support heres a list of things to look at that may help you fix your problem, best of luck!
-
My Minecraft Crash
Full crash log please
-
My Minecraft Crash
Try removing the mod that calls tries to create the entity - the Ultimate Pun Mod
-
[1.12.2] unable to remove itemstack from player inventory
itemstack.damageItem(maxDamage / clipSize, playerIn); what are you trying to do here??
-
[1.12.2] unable to remove itemstack from player inventory
what is fireCD
-
[1.12.2] unable to remove itemstack from player inventory
public abstract class ItemGun extends Item why abstract? public abstract void shoot(World worldIn, EntityPlayer playerIn, EnumHand handIn); why is it abstract and why doesn't it do anything?
-
[1.12.2] unable to remove itemstack from player inventory
look at how ItemBow does it noticed that your already trying to do it the same way can you post a GitHub? your ItemGun class is rather hard to read Ignore this post
-
[1.12] Mod Item Renders will not register
post both classes
-
[1.12] Mod Item Renders will not register
also put registerRender in ModelRegistryEvent using Subscribe Events so that it gets called at the proper time
-
[1.12] Mod Item Renders will not register
Do you have a GitHub you can link?
-
I can't make minecraft mode
In this post I show how to make sure that Java 8 is being used
-
1.7.10 Forge Server low TPS with two players connected
Make sure that the server is the only app running and post your computer specs.
-
Forge 1.12.2 Does not launch.
He meant the entire log. Please post it.
-
I get disconnected when i try to join my singleplayer world
Remove Tinkers Construct
-
I get disconnected when i try to join my singleplayer world
Yes it is necessary, you might be able to add them back in later, once you've found what mod(s) are causing the crash
-
Help Editing Vanilla Blocks and Items
first get your registration working, then try to make your block do something. Off the top of my head onBlockActivated is called when you right-click the block and is used to usually open GUIs. If you do anything inside onBlockActivated, return true. otherwise return false For example: Crafting Tables open the crafting table GUI and return true. Heres the code from the base Block.class and from BlockWorkbench.class
IPS spam blocked by CleanTalk.