-
Posts
3624 -
Joined
-
Last visited
-
Days Won
58
Everything posted by Cadiboo
-
[SOLVED] GameRegistry.ObjectHolder method-based initialisation
Cadiboo replied to hoodwink_dude's topic in Modder Support
@diesieben07 I'll do that then, thanks! -
[SOLVED] GameRegistry.ObjectHolder method-based initialisation
Cadiboo replied to hoodwink_dude's topic in Modder Support
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
Cadiboo replied to hoodwink_dude's topic in Modder Support
Do you know why? I call setRegistryName(MOD_ID, name); does this change this? -
[SOLVED] GameRegistry.ObjectHolder method-based initialisation
Cadiboo replied to hoodwink_dude's topic in Modder Support
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
Cadiboo replied to hoodwink_dude's topic in Modder Support
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
Cadiboo replied to hoodwink_dude's topic in Modder Support
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
Cadiboo replied to hoodwink_dude's topic in Modder Support
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 }; } -
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
-
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!
-
Full crash log please
-
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
Cadiboo replied to InterdimensionalCat's topic in Modder Support
itemstack.damageItem(maxDamage / clipSize, playerIn); what are you trying to do here?? -
[1.12.2] unable to remove itemstack from player inventory
Cadiboo replied to InterdimensionalCat's topic in Modder Support
what is fireCD -
[1.12.2] unable to remove itemstack from player inventory
Cadiboo replied to InterdimensionalCat's topic in Modder Support
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
Cadiboo replied to InterdimensionalCat's topic in Modder Support
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
Cadiboo replied to Geometrically's topic in Modder Support
post both classes -
[1.12] Mod Item Renders will not register
Cadiboo replied to Geometrically's topic in Modder Support
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
Cadiboo replied to Geometrically's topic in Modder Support
Do you have a GitHub you can link? -
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
Cadiboo replied to mmaas44's topic in Support & Bug Reports
Make sure that the server is the only app running and post your computer specs. -
He meant the entire log. Please post it.
-
I get disconnected when i try to join my singleplayer world
Cadiboo replied to screamingwil's topic in Support & Bug Reports
Remove Tinkers Construct -
I get disconnected when i try to join my singleplayer world
Cadiboo replied to screamingwil's topic in Support & Bug Reports
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 -
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