Jump to content

whizvox

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by whizvox

  1. I MISNAMED THE JSON FILE DAMMIT Thanks for the suggestion Choonster.
  2. Trying to get back into modding, and the new rendering system doesn't seem to complicated, except I can't get it to work. The item renders as a black and purple cube in my inventory. Here's the console output: http://pastebin.com/BjWcKWkG And here's the code: Inside main mod class @Mod.EventHandler public void onPreInitialization(FMLPreInitializationEvent event) { FMLLog.info("Currently initializing %s version %s,", Reference.MOD_ID, Reference.VERSION); ConfigurationHandler.init(event.getSuggestedConfigurationFile()); ModItems.init(); proxy.onPreInitialization(event); } @Mod.EventHandler public void onInitialization(FMLInitializationEvent event) { proxy.onInitialization(event); } @Mod.EventHandler public void onPostInitializing(FMLPostInitializationEvent event) { proxy.onPostInitializationEvent(event); FMLLog.info("Finished initializing."); } Inside the ClientProxy class @Override public void onPreInitialization(FMLPreInitializationEvent event) { // register key bindings } @Override public void onInitialization(FMLInitializationEvent event) { ResourceLocationHelper.registerItemRenderer(ModItems.denseMatterVessel); } Inside ResourceLocationHelper public static void registerItemRenderer(ItemQSBase item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register( item, 0, new ModelResourceLocation( Reference.UNIVERSAL_PREFIX + Reference.MOD_ID_LOWERCASE + item.getUnwrappedUnlocalizedName(), "inventory" ) ); } Inside the ModItems class public static ItemDenseMatterVessel denseMatterVessel; public static void init() { GameRegistry.registerItem(denseMatterVessel = new ItemDenseMatterVessel(), "denseMatterVessel"); denseMatterVessel.setCreativeTab(CreativeTabQuantumStorage.INSTANCE); } Inside the ItemDenseMatterVessel class public class ItemDenseMatterVessel extends Item { public ItemDenseMatterVessel() { // UNIVERSAL_PREFIX is "quantumstorage:" setUnlocalizedName(Reference.UNIVERSAL_PREFIX + unlocalizedNameBase); } }
  3. I copied the contents of the Forge 1.7.10-10.13.2.1291 source download into a separate directory, changed a few things in the build.gradle to suit my mod, setup the IntelliJ workspace via command prompt (gradlew idea), opened the generated workspace in IntelliJ IDEA 14.1, setup the decomp workspace (gradlew setupDecompWorkspace), generated IntelliJ run configurations (gradlew genIntelliJRuns), and, upon the prompt, reloaded the workspace.
  4. First off, I'm using the recommended version of Forge for 1.7.10, 10.13.2.1291. Whenever I try to perform the "Reload changed classes" function in IntelliJ IDEA, I get loads of errors. http://puu.sh/h0koe/ca453dc425.png What can I do to fix this?
  5. Title says it all. I tried looking at the Buildcraft code for how the lasers are rendered, but I can't get a clear idea of what's going on. I want some sort of line going from one point to another in 3D space. How do I go about accomplishing that?
  6. Okay, this is freaking weird. Now the correct eye height exists on the server, and not on the client. Client: http://puu.sh/gZIhO/253a7906fa.png Server: http://puu.sh/gZIkY/7a37f2b4a4.png What am I doing wrong?
  7. Damn you're fast. How would I go about creating a Vec3 with the eye height changed? EDIT: Never mind. I'll just use packets.
  8. So I'm trying to find the block the player is looking at by using the EntityPlayer.rayTrace(double, float) method, and it seems to return a different ray trace depending on whether it's being called on the client or server. It works correctly on the client, but on the server, it thinks I'm looking straight down. Client: http://puu.sh/gWO66/d2ee1e3688.png Server: http://puu.sh/gWOcj/3625eafa4c.png Minecraft w/ F3 Info: http://puu.sh/gWOgI/367deb30a9.png Code: @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { if (player.isSneaking()) { MovingObjectPosition rayTrace = player.rayTrace(6, 1.0f); if (rayTrace == null || !(world.getBlock(rayTrace.blockX, rayTrace.blockY, rayTrace.blockZ) instanceof BlockQuarry)) { if (itemStack.getItemDamage() >= 2) { itemStack.setItemDamage(0); } else { itemStack.setItemDamage(itemStack.getItemDamage() + 1); } Utils.sendPlayerChatMessage_debug(player, "META: " + itemStack.getItemDamage()); } } return itemStack; }
×
×
  • Create New...

Important Information

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