Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Draco18s replied to a post in a topic in Modder Support
    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.
  2. Draco18s replied to a post in a topic in Modder Support
    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.
  3. Draco18s replied to a post in a topic in Modder Support
    243 isn't your code, I was mistaken because I found the problem. Which you did not comment on:
  4. Draco18s replied to a post in a topic in Modder Support
    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?
  5. Draco18s replied to a post in a topic in Modder Support
    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).
  6. You are running client only code on the server. This is why we have proxies
  7. Draco18s replied to a post in a topic in Modder Support
    Where do you call new , where do you call GameRegistry.registerItem , when do these occur relative to MCraft() ?
  8. 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.
  9. Draco18s replied to a post in a topic in Modder Support
    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.
  10. Neither. Use World#isRemote , specifically, !isRemote
  11. Draco18s replied to a post in a topic in Modder Support
    Your items are null.
  12. Draco18s replied to a post in a topic in Modder Support
    Ya know what's great? Crash logs. $20 says that you tried to register the crafting recipes before you initialized the items.
  13. You need a way to make the player fly. Probably by doing something every tick while the armor is worn.
  14. 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.
  15. You would need to use metadata and an ISimpleBlockRenderingHandler
  16. 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.
  17. Your common proxy contains client-side code. Not why the game won't load, but its still a problem.
  18. You need to also set the block to not being opaque.
  19. Notice how that image is not a single cuboid, its three. setBlockBounds() will only handle a single cuboid.
  20. 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.
  21. 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).
  22. 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.
  23. (That process is important, as meta:0 for infinite fluids is a source block, but meta:0 for finite fluids is none!)
  24. 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)

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.