Differentiation
Members-
Posts
606 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Differentiation
-
[1.12.2] Projectile texture problem.
Differentiation replied to Differentiation's topic in Modder Support
I'll take the advice into consideration! Thank you! -
[1.12.2] Checking if the player's inventory is full?
Differentiation replied to Differentiation's topic in Modder Support
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. -
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!
-
[1.12.2] Checking if the player's inventory is full?
Differentiation replied to Differentiation's topic in Modder Support
There is an item in every slot, doesn't have to be max stack size. -
Forge Installer Not Opening
Differentiation replied to kyle123cool123's topic in Support & Bug Reports
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 -
Forge Installer Not Opening
Differentiation replied to kyle123cool123's topic in Support & Bug Reports
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. -
Forge Installer Not Opening
Differentiation replied to kyle123cool123's topic in Support & Bug Reports
Are you running the command in the proper directory??! -
Forge Installer Not Opening
Differentiation replied to kyle123cool123's topic in Support & Bug Reports
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.) -
Forge Installer Not Opening
Differentiation replied to kyle123cool123's topic in Support & Bug Reports
java -jar forge-1.12.2-14.23.1.2602-installer.jar -
Forge Installer Not Opening
Differentiation replied to kyle123cool123's topic in Support & Bug Reports
My apologies: java -jar [FILE NAME].jar [OPTIONAL MODIFIERS] -
Forge Installer Not Opening
Differentiation replied to kyle123cool123's topic in Support & Bug Reports
Is the .jar file located in your Desktop!? -
Forge Installer Not Opening
Differentiation replied to kyle123cool123's topic in Support & Bug Reports
Don't use the newest versions! You have to be joking me. Use an older one, but not TOO old -
Forge Installer Not Opening
Differentiation replied to kyle123cool123's topic in Support & Bug Reports
What is your Java version? -
Forge Installer Not Opening
Differentiation replied to kyle123cool123's topic in Support & Bug Reports
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] -
[1.12.2] Checking if the player's inventory is full?
Differentiation replied to Differentiation's topic in Modder Support
I meant the hotbar and all the slots, excluding offhand and armor slots. -
[1.12.2] [SOLVED] Way to yield random item or block?
Differentiation replied to Differentiation's topic in Modder Support
Thank you! That makes everything clear now. -
[1.12.2] [SOLVED] Way to yield random item or block?
Differentiation replied to Differentiation's topic in Modder Support
ItemBlock being the inventory item of a "block"? -
[1.12.2] [SOLVED] Way to yield random item or block?
Differentiation replied to Differentiation's topic in Modder Support
The List<Item> still doesn't contain any blocks... -
[1.12.2] [SOLVED] Way to yield random item or block?
Differentiation replied to Differentiation's topic in Modder Support
........ and??? The list wouldn't give blocks -
[1.12.2] [SOLVED] Way to yield random item or block?
Differentiation replied to Differentiation's topic in Modder Support
Yes, ItemBlock, but there is no ForgeRegistries list for that, if I stand corrected -
[1.12.2] [SOLVED] Way to yield random item or block?
Differentiation replied to Differentiation's topic in Modder Support
The player's inventory of course, as an ItemStack -
[1.12.2] [SOLVED] Way to yield random item or block?
Differentiation replied to Differentiation's topic in Modder Support
I want the player to obtain a random item or block from right clicking an item. -
[1.12.2] [SOLVED] Way to yield random item or block?
Differentiation replied to Differentiation's topic in Modder Support
Then what does contain item and block instances??? -
[1.12.2] [SOLVED] Way to yield random item or block?
Differentiation replied to Differentiation's topic in Modder Support
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()));