Everything posted by Draco18s
-
recipes
Well. Given that the ClientProxy he posted contains an empty @Override for the PreInit method (no call to super) that code would not produce that call stack.
-
recipes
He's not, actually. He has a CommonProxy (which registers crafting) that the server proxy extends, and the client proxy extends the server proxy. (The "common" part can be wholly removed and its code added elsewhere). Recipes, item instantiation, item registration all of that should happen in the main mod class. Some tutorial recently shoved it all into the proxy for no god damn reason and its made a mess of things ever since.
-
recipes
243 isn't your code, I was mistaken because I found the problem. Which you did not comment on:
-
recipes
And which line is line 243? Actually I don't care. GameRegistry.addShapelessRecipe(new ItemStack(Bong.bbowl, 3), new Object(), " B ", 'B', Items.iron_ingot); new Object() ? Seriously?
-
recipes
Ok, so now I need to see the mitems class, because none of the code you posted lately references it. GameRegistry.addShapelessRecipe(new ItemStack(mitems.nvud, 9), new Object[]{" X ", 'X', mitems.mvud}); See how you make an item stack from mitems.nvud ? Where it nvud set to a value? It certainly isn't happening in your Bulb (or other item) classes, which do the instantiation and registration (which, by the way, is terrible practice).
-
java.lang.NoSuchMethodError on Minecraft launch
You are running client only code on the server. This is why we have proxies
-
recipes
Where do you call new , where do you call GameRegistry.registerItem , when do these occur relative to MCraft() ?
-
[1.8.9] Making a torch emit 'more' light than 15
You would need fake light emitting blocks. I don't recommend it. Trying to clean them up correctly when placing/removing multiple light sources in near proximity would be problematic.
-
recipes
You don't need the whole new Object[] {} syntax, as Java's varargs feature is syntactic sugar that does it for you. But you still haven't addressed what I said was wrong. Or shown otherwise.
-
[1.8.9][Loot] Changing default values of Minecraft entities, blocks or items
Neither. Use World#isRemote , specifically, !isRemote
- recipes
-
recipes
Ya know what's great? Crash logs. $20 says that you tried to register the crafting recipes before you initialized the items.
-
1.8.9 is LivingUpdateEvent serverside only
What.
-
[1.7]Is there a way to make my own elytra with the code I have?
You need a way to make the player fly. Probably by doing something every tick while the armor is worn.
-
[Resolved] Problem with proxy's? [1.7.10]
So should I just get rid of all the code that is in both? If it references a class that only exists on the client, it goes in the client proxy. If it does not, it goes in the common proxy.
-
[1.7.10] Enabling parts of a model??
You would need to use metadata and an ISimpleBlockRenderingHandler
-
[1.8] Is there a way to extend the duration that it takes for an item to smelt?
I'll note that the only reason I did that was because the ore was easy to find and crap late game. The player shouldn't want to set up the industry to smelt the stuff into usable metal. It was only there to provide a metal resource in small quantities.
-
[Resolved] Problem with proxy's? [1.7.10]
Your common proxy contains client-side code. Not why the game won't load, but its still a problem.
-
[1.7.10] [SOLVED] How to make a block that is not 1x1x1?
You need to also set the block to not being opaque.
-
[1.7.10] [SOLVED] How to make a block that is not 1x1x1?
Notice how that image is not a single cuboid, its three. setBlockBounds() will only handle a single cuboid.
-
[1.7.10] [SOLVED] How to make a block that is not 1x1x1?
Except that it won't work like that. Imagine a corner piece. You can't set any cuboid boundaries that result in an L shape.
-
[1.7.10] NEI + My Mod
My code above was for 1.7.10 and was for a very simple machine. CoolAlias's tutorials are extra generic and cover how to go about working with an API of any sort, looks like 1.7.10 though. The only thing to be aware of when programming for an API is what to do if the API is not present, ie. if someone does not have NEI installed. For something like NEI, this is easy: wrap your NEI API calls in a separate class and only call methods in that class if NEI is loaded. For other things, like when a block or item needs to implement some API interface, but you still want that item to work when the API isn't available, you need to use the @Optional annotations, found in the cpw.mods.fml.common package ( import cpw.mods.fml.common; ). @Optional is essentially (a flag for) some wicked clever ASM that strips out interfaces and/or methods if the target mod isn't installed (as not stripping them out would cause ClassNotFound errors). Lets you have TileEntities which extend IEnergyProvider from [tech mod here] and IGenerator from [some other tech mod] and work with either but require none, instead using your own blocks. Here's an example: public class IndustryEventHandler { @SubscribeEvent public void onCrafting(PlayerEvent.ItemCraftedEvent event) { //standard event method } @SubscribeEvent @Optional.Method(modid = "HardLib") public void itemFrameCompare(ItemFrameComparatorPowerEvent event) { if(event.stack == null || !(event.entity instanceof EntityItemFrame) || event.power > 0) return; event.power = ((EntityItemFrame)event.entity).getRotation()*2+1; } } The itemFrameCompare method has an event object of type ItemFrameComparatorPowerEvent which I had added to my own core library, but the mod this is in has no other dependencies, so it was not set up to actually depend on that library. So rather than go "surprise, you need my library" I marked it as optional. The feature won't work without the library, but there was no reason to enforce the dependency for such a trivial feature. (This event/method adds the ItemFrame Comparator function present in 1.8 to 1.7.10 in order to meet the demands of a requested feature in one of my other mods, the general-purpose orientation code was easy to write and fit in with this particular mod).
-
[1.8.9] When does ModelbakeEvent happen?
I kind of think that he's actually replacing the block with his own block, which has a tile entity. He wants to know how to store the original so it can be rendered. The answer to that is: store the original in the TE and reference it during rendering.
-
[1.7.10] Check if block is fluid source block
(That process is important, as meta:0 for infinite fluids is a source block, but meta:0 for finite fluids is none!)
-
[1.8.9][SOLVED] Make a recipe that needs more than 1 Item unit on the same slot
I haven't looked, but pretty sure that the vanilla workbench has it hardcoded to only use one of each. There are custom IRecipe implementations, but while you could make the output not show up unless 3 of the item were in a stack, I don't think it would actually use all three. Here's what my block does, it's very single-purpose, pro-automation. http://reasonable-realism.wikia.com/wiki/Sifter The stack-of-eight is actually an efficiency improvement over the workbench crafting recipe (uses 9). (And the second input slot is just a buffer area, like the hopper)
IPS spam blocked by CleanTalk.