Jump to content

Differentiation

Members
  • Posts

    606
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Differentiation

  1. I'll take the advice into consideration! Thank you!
  2. Well, initially I needed if for the Random Item yielding onItemRightClick (the last Thread you helped on): when the EntityPlayer's Inventory is full, return a failed ActionResult, but I changed my mind and just copied the code from CommandGive, and the Item just drops on the ground if the EntityPlayer's Inventory is full.
  3. Hey! So I have projectiles, they render on the singleplayer, but not on a server. My classes: Main: @Mod(modid = "dinocraft", name = Reference.NAME, version = Reference.VERSION) public class Dinocraft { me.dinocraft.handlers.EventHandler eventHandler = new me.dinocraft.handlers.EventHandler(); public static final CreativeTabs BLOCKS = new TabDinocraftBlocks(); public static final CreativeTabs ITEMS = new TabDinocraftItems(); @Mod.Instance(Reference.MODID) public static Dinocraft instance; @SidedProxy(serverSide = Reference.SERVER_PROXY_CLASS, clientSide = Reference.CLIENT_PROXY_CLASS) public static ServerProxy PROXY; @EventHandler public void preInit(FMLPreInitializationEvent event) { DinocraftItems.register(); DinocraftBlocks.register(); DinocraftTools.register(); DinocraftArmour.register(); //DinocraftAchievements.register(); PROXY.registerRenders(); PROXY.preInit(event); DinocraftCapabilities.registerCapabilities(); } @EventHandler public void init(FMLInitializationEvent event) { PROXY.init(); RecipeHandler.registerCraftingRecipes(); RecipeHandler.registerFurnaceRecipes(); MinecraftForge.EVENT_BUS.register(DinocraftSoundEvents.class); MinecraftForge.EVENT_BUS.register(RecipeHandler.class); NetworkHandler.init(); eventHandler.init(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } @EventHandler public void serverLoad(FMLServerStartingEvent event) { event.registerServerCommand(new CommandMaxHealth()); event.registerServerCommand(new CommandFeed()); event.registerServerCommand(new CommandHeal()); event.registerServerCommand(new CommandBoing()); event.registerServerCommand(new CommandAsServer()); event.registerServerCommand(new CommandPing()); event.registerServerCommand(new CommandBreak()); event.registerServerCommand(new CommandJump()); event.registerServerCommand(new CommandFly()); event.registerServerCommand(new CommandKaboom()); } } DinocraftEntities: public class DinocraftEntities { @SideOnly(Side.CLIENT) public static void init() { int id = 0; EntityRegistry.registerModEntity(RenderEntities.VINE_BALL_TEXTURE, EntityVineBall.class, "vine_ball", id++, Dinocraft.instance, 64, 10, true); EntityRegistry.registerModEntity(RenderEntities.POISON_BALL_TEXTURE, EntityPoisonBall.class, "poison_ball", id++, Dinocraft.instance, 64, 10, true); EntityRegistry.registerModEntity(RenderEntities.RAY_BULLET_TEXTURE, EntityRayBullet.class, "ray_bullet", id++, Dinocraft.instance, 64, 10, true); } /* private static int id; public static void preInit() { registerEntity(EntityVineBall.class); registerEntity(EntityPoisonBall.class); registerEntity(EntityRayBullet.class); } */ /* private static void registerEntity(Class clazz) { EntityRegistry.registerModEntity(new ResourceLocation(Reference.MODID + ":textures/items/vine_ball.png"), clazz, "vine_ball", ++id, Dinocraft.instance, 64, 3, true); EntityRegistry.registerModEntity(new ResourceLocation(Reference.MODID + ":textures/items/poison_ball.png"), clazz, "poison_ball", ++id, Dinocraft.instance, 64, 3, true); EntityRegistry.registerModEntity(new ResourceLocation(Reference.MODID + ":textures/items/ray_bullet.png"), clazz, "ray_bullet", ++id, Dinocraft.instance, 64, 3, true); /* String unlocalizedName = clazz.getSimpleName().replace("Entity", ""); unlocalizedName = unlocalizedName.substring(0, 1).toLowerCase() + unlocalizedName.substring(1); ResourceLocation registryName = new ResourceLocation(Reference.MODID, unlocalizedName); EntityRegistry.registerModEntity(registryName, clazz, unlocalizedName, ++id, Dinocraft.instance, 64, 3, true); */ //} } RenderEntities: public class RenderEntities extends RenderEntity { public RenderEntities(RenderManager render) { super(render); } public static final ResourceLocation VINE_BALL_TEXTURE = new ResourceLocation(Reference.MODID + ":textures/items/vine_ball.png"); public static final ResourceLocation POISON_BALL_TEXTURE = new ResourceLocation(Reference.MODID + ":textures/items/poison_ball.png"); public static final ResourceLocation RAY_BULLET_TEXTURE = new ResourceLocation(Reference.MODID + ":textures/items/ray_bullet.png"); } ServerProxy: public class ServerProxy { public void preInit(FMLPreInitializationEvent event) { } public void init() { GameRegistry.registerWorldGenerator(new OreGen(), 0); } public void registerRenders() { } public EntityPlayer getPlayer() { return null; } } ClientProxy: public class ClientProxy extends ServerProxy { @Override public void preInit(FMLPreInitializationEvent event) { super.preInit(event); initRenderers(); DinocraftEntities.init(); //registerEntityRenders(); } @SideOnly(Side.CLIENT) private void initRenderers() { RenderingRegistry.registerEntityRenderingHandler(EntityVineBall.class, renderManager -> new RenderSnowball(renderManager, DinocraftItems.VINE_BALL, Minecraft.getMinecraft().getRenderItem())); RenderingRegistry.registerEntityRenderingHandler(EntityPoisonBall.class, renderManager -> new RenderSnowball(renderManager, DinocraftItems.POISON_BALL, Minecraft.getMinecraft().getRenderItem())); RenderingRegistry.registerEntityRenderingHandler(EntityRayBullet.class, renderManager -> new RenderSnowball(renderManager, DinocraftItems.RAY_BULLET, Minecraft.getMinecraft().getRenderItem())); } /* private static void registerEntityRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityVineBall.class, RenderVineBall::new); RenderingRegistry.registerEntityRenderingHandler(EntityPoisonBall.class, RenderPoisonBall::new); RenderingRegistry.registerEntityRenderingHandler(EntityRayBullet.class, RenderRayBullet::new); } */ @Override public void registerRenders() { DinocraftItems.registerRenders(); DinocraftBlocks.registerRenders(); DinocraftTools.registerRenders(); DinocraftArmour.registerRenders(); } @Override public EntityPlayer getPlayer() { return FMLClientHandler.instance().getClient().player; } } I'm not too sure what's wrong, and I'll take any criticisms. Any suggestions are welcome. Thank you!
  4. There is an item in every slot, doesn't have to be max stack size.
  5. I'm not sure what the problem might be. Your best bet is waiting for @diesieben07 to wake up and help because I'm pretty sure he lives in Germany and is asleep at the moment
  6. And what installer are you downloading, the Windows one or the regular one!??!?!? I coincidentally happen to have Java 8 144 as well and it's working perfectly fine for me.
  7. Are you running the command in the proper directory??!
  8. You should. And also, download recommended Forge version for Minecraft 1.12.2 (i.e. 1.12.2 - 14.23.1.2555) (Recommended versions bode well with your system.)
  9. java -jar forge-1.12.2-14.23.1.2602-installer.jar
  10. My apologies: java -jar [FILE NAME].jar [OPTIONAL MODIFIERS]
  11. Is the .jar file located in your Desktop!?
  12. Don't use the newest versions! You have to be joking me. Use an older one, but not TOO old
  13. What is your Java version?
  14. Download the Windows Installer, not the plain Installer. And also don't just open the Java file by clicking it twice, open the Command Prompt and go to the file directory, then run the Java file through there. In the Command Prompt, type: java -[YOUR JAVA FILE NAME].jar [optional modifiers here]
  15. I meant the hotbar and all the slots, excluding offhand and armor slots.
  16. Hey! I was wondering, is there a way to check if the player's inventory is full (only the 27 slots)? Any suggestions are welcome. Thanks!
  17. Thank you! That makes everything clear now.
  18. ItemBlock being the inventory item of a "block"?
  19. The List<Item> still doesn't contain any blocks...
  20. ........ and??? The list wouldn't give blocks
  21. Yes, ItemBlock, but there is no ForgeRegistries list for that, if I stand corrected
  22. The player's inventory of course, as an ItemStack
  23. I want the player to obtain a random item or block from right clicking an item.
  24. Then what does contain item and block instances???
  25. Item is a list of all Items and Blocks, or just Items? List<Item> items = Lists.newArrayList(ForgeRegistries.ITEMS.getValues()); Random rand = new Random(); Item item = items.get(rand.nextInt(items.size()));
×
×
  • Create New...

Important Information

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