Everything posted by GodOfYeti
-
Icon not rendering
Package, class, constant, methods. Yep. (packages are all lower case. Classes are camel case with a capitalized first letter, constants are ALL CAPS, methods, fields, and other variables are camel case with lower case first letter). Because your method signature is wrong. It's not overriding any function in the super class. Look closely. What can I do to fix it
-
Icon not rendering
Not to be rude but ya getting a little bit off topic, the getIIcon tells me to remove @override
-
Icon not rendering
It tells me to remove the override function
-
Icon not rendering
heres my code package com.mcpixelplex.blocks; import com.mcpixelplex.CreativeTabs.BlessedCreativeTab; import com.mcpixelplex.lib.RefStrings; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; public class machineBlock extends Block{ public machineBlock(Material p_i45394_1_) { super(p_i45394_1_); } @SideOnly(Side.CLIENT) public static IIcon topIcon; @SideOnly(Side.CLIENT) public static IIcon sideIcon; @SideOnly(Side.CLIENT) public static IIcon frontIcon; @SideOnly(Side.CLIENT) public void registerIIcons(IIconRegister icon) { topIcon = icon.registerIcon(RefStrings.MODID + ":machineBlockTop"); //top sideIcon = icon.registerIcon(RefStrings.MODID + ":machineBlockSide"); //side frontIcon = icon.registerIcon(RefStrings.MODID + ":machineBlockFront"); //front } public IIcon getIIcon(int side, int meta) { if(side == 0 || side == 1) { return topIcon; } else if(side == 2) { return frontIcon; } else { return sideIcon; } } }
-
Help with crashing
Ok I got it working now why isnt my icon rendering the texture
-
Help with crashing
CommonProxy package com.mcpixelplex.proxy; public class CommonProxy { public void initRenderers() { } public void initSounds() { } } ClientProxy package com.mcpixelplex.proxy; public class ClientProxy extends CommonProxy { @Override public void initRenderers() { } @Override public void initSounds() { } } Main package com.mcpixelplex; import net.minecraft.item.Item; import com.mcpixelplex.CreativeTabs.BlessedCreativeTab; import com.mcpixelplex.Gui.ItemGui; import com.mcpixelplex.blocks.BBlocks; import com.mcpixelplex.items.BItems; import com.mcpixelplex.lib.*; import com.mcpixelplex.proxy.ClientProxy; import com.mcpixelplex.proxy.ServerProxy; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = RefStrings.MODID , name = RefStrings.NAME, version = RefStrings.VERSION) public class Main { @SidedProxy(clientSide = RefStrings.CLIENTSIDE, serverSide = RefStrings.SERVERSIDE) public static ServerProxy serverProxy; public static ClientProxy clientProxy; @EventHandler public static void PreLoad(FMLPreInitializationEvent PreEvent){ BlessedCreativeTab.initializeTabs(); BItems.mainRegistry(); BBlocks.mainRegistry(); CraftingManager.mainRegistry(); //serverProxy.registerRenderInfo(); clientProxy.initRenderers(); clientProxy.initSounds(); } @EventHandler public static void load(FMLInitializationEvent event){ } @EventHandler public static void PostLoad(FMLPostInitializationEvent PostEvent){ } }
-
Help with crashing
That is the entire crash log
-
Help with crashing
Heres the crash ---- Minecraft Crash Report ---- // Why is it breaking Time: 1/25/15 3:04 PM Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:76) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:492) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) at cpw.mods.fml.common.Loader.loadMods(Loader.java:492) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:204) at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) at net.minecraft.client.Minecraft.run(Minecraft.java:931) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) at GradleStart.main(GradleStart.java:45) Caused by: cpw.mods.fml.common.LoaderException at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:69) ... 35 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_25, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 934893688 bytes (891 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed testmod{1.0} [Test Mod] (bin) Unloaded->Errored Heres the code Blocks package com.mcpixelplex.blocks; import com.mcpixelplex.CreativeTabs.BlessedCreativeTab; import com.mcpixelplex.lib.RefStrings; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class BBlocks { public static void mainRegistry(){ initializeBlock(); reigsterBlock(); init(); addNames(); } public static Block xpBlock; public static Block clearGlass; public static Block testBlock; public static Block machineBlock; public static void init() { } public static void initializeBlock(){ xpBlock = new xpBlock(Material.glass).setBlockName("xpBlock").setCreativeTab(BlessedCreativeTab.tabBlocks).setBlockTextureName(RefStrings.MODID + ":test"); clearGlass = new clearGlass(Material.glass).setBlockName("clearGlass").setCreativeTab(BlessedCreativeTab.tabBlocks).setBlockTextureName(RefStrings.MODID + ":Air"); testBlock = new testBlock(Material.ground).setBlockName("testBlock").setCreativeTab(BlessedCreativeTab.tabBlocks); machineBlock = new machineBlock(Material.iron).setBlockName("machineBlock").setCreativeTab(BlessedCreativeTab.tabBlocks).setHardness(5F).setResistance(10F); } public static void reigsterBlock(){ GameRegistry.registerBlock(xpBlock, xpBlock.getUnlocalizedName()); GameRegistry.registerBlock(clearGlass, clearGlass.getUnlocalizedName()); GameRegistry.registerBlock(testBlock, testBlock.getUnlocalizedName()); GameRegistry.registerBlock(machineBlock, "machineBlock"); } public static void addNames() { LanguageRegistry.addName(machineBlock, "machineBlock"); } } machineBlock package com.mcpixelplex.blocks; import com.mcpixelplex.CreativeTabs.BlessedCreativeTab; import com.mcpixelplex.lib.RefStrings; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; public class machineBlock extends Block{ public machineBlock(Material p_i45394_1_) { super(p_i45394_1_); } @SideOnly(Side.CLIENT) public static IIcon topIcon; @SideOnly(Side.CLIENT) public static IIcon sideIcon; @SideOnly(Side.CLIENT) public static IIcon frontIcon; @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister icon) { topIcon = icon.registerIcon(RefStrings.MODID + ":machineBlockTop"); //top sideIcon = icon.registerIcon(RefStrings.MODID + ":machineBlockSide"); //side frontIcon = icon.registerIcon(RefStrings.MODID + ":machineBlockFront"); //front } @Override public IIcon getIcon(int side, int meta) { if(side == 0 || side == 1) { return topIcon; } else if(side == 2) { return frontIcon; } else { return sideIcon; } } }
-
Icon help
lets say I wanted to set a icon side, public static Icon frontIcon; well in 1.7.10 there is no "Icon" and "IconRegister" so what would be it replacement
-
Machine block
I've tried scratchforfun and to be honest its not really that good
-
API
Ya I know theres alot of energy systems out there, but im not making the mod for the public im making it for the knowledge. Ok I took a look at the Universal Electricity api and it is broke
-
API
Ya I know theres alot of energy systems out there, but im not making the mod for the public im making it for the knowledge.
-
Machine block
Is there a tutorial out there on how to make a machine block I would love to understand how to do it
-
API
Ok guys I am not a beginner but im not a expert either, I was wanting to make a energy api but was wondering where to start
-
Display Chat message
How would I go about doing this, I figure it would be a event that detects if your looking at a block but I don't know how to go about starting it
-
actionPerformed not working
I did find the problem, I thought it wasnt working because the time wasnt changing formats but the problem was that I was calling a new variable String time = sdf.format(new Date()); when I already had the variable setup.
-
Make a block save data
Im sorry Im pretty new, do you have a link somewhere of where I can go to get a better understanding
-
Make a block save data
Ok I have a block with a gui and I was wondering how to make it save the data heres the code package com.mcpixelplex.Gui; import java.awt.Font; import java.awt.font.FontRenderContext; import java.awt.geom.AffineTransform; import java.text.SimpleDateFormat; import java.util.Date; import org.lwjgl.opengl.GL11; import com.mcpixelplex.items.bStick; import com.mcpixelplex.lib.RefStrings; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentText; import net.minecraft.util.ResourceLocation; public class InfoGui extends GuiScreen { Minecraft mc = Minecraft.getMinecraft(); GuiButton testButton; EntityPlayer player = mc.thePlayer; String title = "Info Block"; AffineTransform affinetransform = new AffineTransform(); FontRenderContext frc = new FontRenderContext(affinetransform,true,true); Font font = new Font("Tahoma", Font.PLAIN, 12); int titleWidth = (int)(font.getStringBounds(title, frc).getWidth()); int titleheight = (int)(font.getStringBounds(title, frc).getHeight()); int tabWidth = 61 + 10; int titleXPos = (tabWidth - titleWidth) / 2; SimpleDateFormat sdf = new SimpleDateFormat("h:mm a"); String time = sdf.format(new Date()); String format = "24 Hour Period"; boolean timeFormat; public final int xSizeOfTexture = 256; public final int ySizeOfTexture = 156; public final int xSizeOfInterier = 226; public final int ySizeOfInterier = 113; public final int xSizeOfSideGap = 11; public final int ySizeOfSideGap = 115; public final int xSizeOfTopGap = 228; public final int ySizeOfTopGap = 11; public final int xSizeOfBottomGap = xSizeOfTopGap; public final int ySizeOfBottomGap = ySizeOfTopGap; @Override public void drawScreen(int x, int y, float f){ int xPos = (this.width - xSizeOfTexture) / 2; int yPos = (this.height - ySizeOfTexture) / 2; int levelPosX = (xSizeOfTexture) / 2; int levelPosY = (ySizeOfTexture) / 2; int bottom = (ySizeOfTexture - 20 - 2); GL11.glColor4f(1F, 1F, 1F, 1F); mc.renderEngine.bindTexture(new ResourceLocation(RefStrings.MODID, "/textures/gui/background2.png")); drawDefaultBackground(); drawTexturedModalRect(xPos, yPos, 0, 0, xSizeOfTexture, ySizeOfTexture); //drawRect(xPos + 5, bottom + 40, 30, 100, 0x000000); //drawRect(xPos + 5, bottom + 40, 30, currentPower, 0xd01414); fontRendererObj.drawString("Info Block", xPos + 10 + titleXPos, yPos + 4, 0x000000); fontRendererObj.drawString("Name: " + player.getDisplayName(), xPos + xSizeOfSideGap + 5 , yPos + ySizeOfBottomGap + 120, 0x000000); fontRendererObj.drawString("Time: " + time, xPos + xSizeOfSideGap + 5 , yPos + ySizeOfBottomGap + 100, 0x000000); fontRendererObj.drawString("Location " + "X: " + bStick.xm + " Y: " + bStick.ym + " Z: " + bStick.zm, xPos + xSizeOfSideGap + 5, yPos + ySizeOfBottomGap + 80, 0x000000); super.drawScreen(x, y, f); } public void initGui(){ int xSize = 100; int ySize = 20; int xPos = (xSizeOfTexture) / 2; int yPos = (ySizeOfTexture) / 2; int bottom = (ySizeOfTexture - ySize - 2); buttonList.clear(); buttonList.add(new GuiButton(0, xPos + xSizeOfSideGap + 100, bottom + ySizeOfBottomGap + 40, 100, 20, format)); super.initGui(); } public void actionPerformed(GuiButton button){ switch(button.id){ case 0: if(timeFormat == true){ timeFormat = false; format = "12 Hour Period"; sdf = new SimpleDateFormat("h:mm a"); time = sdf.format(new Date()); }else{ timeFormat = true; format = "24 Hour Period"; sdf = new SimpleDateFormat("HH:mm"); time = sdf.format(new Date()); } break; } player.addChatComponentMessage(new ChatComponentText("TimeFormat: " + timeFormat)); } @Override public boolean doesGuiPauseGame(){ return false; } }
-
actionPerformed not working
why isnt this working public void actionPerformed(GuiButton button){ switch(button.id){ case 0: if(timeFormat == true){ timeFormat = false; format = "12 Hour Period"; sdf = new SimpleDateFormat("h:mm a"); String time = sdf.format(new Date()); }else if(timeFormat == false){ timeFormat = true; format = "24 Hour Period"; sdf = new SimpleDateFormat("HH:mm"); String time = sdf.format(new Date()); } break; } }
-
Display Chat message
Thanks and is there a way to display the message when you look at a block?
-
Display Chat message
Whats a way to display a chat message
- Changing cursor?
-
Changing cursor?
I was wondering if there was a way to change the in-game cursor and if so how would I go about doing this
-
Timer
What would be the easiest way to make a simple timer I know there is Thread.sleep() but half the time it crashes the game
-
XP help
How is addExperienceLevel() spawning a entity
IPS spam blocked by CleanTalk.