Spideynn
-
Posts
10 -
Joined
-
Last visited
Posts posted by Spideynn
-
-
Is it possible to manipulate the health regeneration or disable regeneration all together? I've been going through through the Minecraft Forge API and the Minecraft source, (specifically the naturalRegeneration gamerule) but haven't found anything.
-
I find that when you're working on the model, it is best to have a texture file that is filled in with a solid coloar (don't worry about proper texture map, just have a 64 x 32 file that is some color that is easy to see like orange.
What it looks like to me is that your model isn't finding the right texture. (Do you see any errors in the console log indicating that it didn't find the texture?)
Or maybe your texture is found but the texture offsets are wrong (this can be tricky to get right).
Lastly, you might have got your texture improperly scaled. You MUST have your texture file keep the same 2:1 width to height ratio, otherwise it will squish the texture in one dimension and cause transparent gaps.
Anyway, it is one of those three things. In all cases, if you try with a fully filled texture image you can confirm that the model is working properly before you fool around further with the texture mapping itself.
I think 2 things may be happening here
1. Texture offsets
or
2. My Techne model resized itself to 128x32.
Most likely #2, but im going to make a fully filled texture image to see if it is working.
EDIT: Its the 128x32 causing the issue, as well as duplicate Shape1 variables.
-
This works for 1.6.4 & 1.7.2
1. Go to http://files.minecraftforge.net/
2. Download the 1.6.4 Recommended installer if your using 1.6.4. If your using 1.7.2, download the 1.7.2 recommended installer.
3. Once downloaded, open it by double clicking it (or right-click it and Open With -> Java).
4. Click install server and select your server folder
5. In the folder rename the Forge-__.__.___.jar to forge.jar
6. Make a new Text file and rename it start.bat (remove .txt)
7. In that file type:
java -Xmx1024M -Xms1024M -jar forge.jar nogui
(Adjust the 1024M part for how much memory you want to allocate to the server, 2GB of memory would be -Xmx2G -Xms2G)
8. Run the start.bat file
9. To connect in game use the ip of your computer (localhost if it is on the same computer you play Minecraft on.). You need to port forward for others to connect to the server.
For others to connect, they need to have the same version of Forge. They are required to have the same mods that are on the server, BUT they can have other mods that the server doesn't have, they just won't be able to use what is in the other mod they have.
-
I made a model for a trashcan for a mod. (I was playing around with the Forge API and to get used to it)
This is what happens: (No errors)
This is what the model looks like in Techne:
Model class: http://pastebin.com/HqRvFm5M
Block class: http://pastebin.com/wWpnG80P
Renderer class: http://pastebin.com/WgY7Ud3S
Main class: http://pastebin.com/JPdN5hk6
Any ideas? (Will post any other info needed)
-
You have 2 pushmatrix's in your render class, delete the second one!! That should fix it!
That fixed the stack overflow error, but it is still not rendering properly.
EDIT: This is what the model looks like in Techne:
-
I was following a tutorial to make a custom block since I was playing around with another mod's sourcecode to learn the forge api (the custom block was coded by me + I made the model in Techne)
What happens:
Error:
2014-04-24 12:08:29 [sEVERE]########## GL ERROR ##########
2014-04-24 12:08:29 [sEVERE] [Minecraft-Client] @ Post render
2014-04-24 12:08:29 [sEVERE] [Minecraft-Client] 1283: Stack overflow
Model class: http://pastebin.com/HqRvFm5M
Block class: http://pastebin.com/wWpnG80P
Renderer class: http://pastebin.com/WgY7Ud3S
Main class: http://pastebin.com/JPdN5hk6
Any ideas? (Will post any other info needed)
-
Check to see that your server.properties has "online-mode=false". That's what kept it from working for me until I fixed that.
That fixed it! Now I just need to fix the armor not having a texture
-
When I try to connect to a server with my mod, the client crashes. Log: https://gist.github.com/anonymous/f800fc22e52426eaad1c
Source:
EmeraldArmorCore:
package net.spideynn.emeraldarmor; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.util.WeightedRandomChestContent; import net.minecraftforge.common.ChestGenHooks; import net.minecraftforge.common.EnumHelper; 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.event.FMLServerStartingEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "ea", version = "1.0.0", name = "EmeraldArmor") @NetworkMod(clientSideRequired = true, serverSideRequired = true) public class EmeraldArmorCore { @SidedProxy(clientSide="net.spideynn.emeraldarmor.ClientProxy", serverSide="net.spideynn.emeraldarmor.CommonProxy") public static CommonProxy proxy; public static EnumArmorMaterial EmeraldArmorMaterial; public static ItemArmor emeraldHelmet; public static ItemArmor emeraldChest; public static ItemArmor EmeraldLeggings; public static ItemArmor emeraldBoots; @EventHandler public void preInit(FMLPreInitializationEvent event) { EmeraldArmorMaterial = EnumHelper.addArmorMaterial( "EmeraldArmorMaterial", 3741, new int[] { 746, 1076, 1010, 878 }, 20); emeraldHelmet = (ItemArmor) new EmeraldHelmet(3200, EmeraldArmorCore.EmeraldArmorMaterial, 0, 0) .setUnlocalizedName("emeraldHelmet"); GameRegistry.registerItem(emeraldHelmet, "emeraldHelmet"); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.emeraldHelmet), 1, 1, 005)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.emeraldHelmet), 1, 1, 005)); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.emeraldHelmet), 1, 1, 005)); emeraldChest = (ItemArmor) new EmeraldChestplate( EmeraldArmorCore.EmeraldArmorMaterial, 1, 1) .setUnlocalizedName("emeraldChest"); GameRegistry.registerItem(emeraldChest, "emeraldChest"); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.emeraldChest), 1, 3, 005)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.emeraldChest), 1, 3, 005)); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.emeraldChest), 1, 3, 005)); EmeraldLeggings = (ItemArmor) new EmeraldLeggings( EmeraldArmorCore.EmeraldArmorMaterial, 2, 2) .setUnlocalizedName("EmeraldLeggings"); GameRegistry.registerItem(EmeraldLeggings, "EmeraldLeggings"); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.EmeraldLeggings), 1, 3, 005)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.EmeraldLeggings), 1, 3, 005)); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.EmeraldLeggings), 1, 3, 005)); emeraldBoots = (ItemArmor) new EmeraldBoots( EmeraldArmorCore.EmeraldArmorMaterial, 3, 3) .setUnlocalizedName("emeraldBoots"); GameRegistry.registerItem(emeraldBoots, "emeraldBoots"); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_JUNGLE_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.emeraldBoots), 1, 3, 005)); ChestGenHooks.getInfo(ChestGenHooks.DUNGEON_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.emeraldBoots), 1, 3, 065)); ChestGenHooks.getInfo(ChestGenHooks.PYRAMID_DESERT_CHEST).addItem( new WeightedRandomChestContent(new ItemStack( EmeraldArmorCore.emeraldBoots), 1, 3, 005)); } @EventHandler public void init(FMLInitializationEvent event) { GameRegistry.addRecipe(new ItemStack(EmeraldArmorCore.emeraldHelmet), new Object[] { "XXX", "X0X", 'X', Item.emerald }); GameRegistry.addRecipe(new ItemStack(EmeraldArmorCore.emeraldChest), new Object[] { "X0X", "XXX", "XXX", 'X', Item.emerald }); GameRegistry.addRecipe(new ItemStack(EmeraldArmorCore.EmeraldLeggings), new Object[] { "XXX", "X0X", "X0X", 'X', Item.emerald }); GameRegistry.addRecipe(new ItemStack(EmeraldArmorCore.emeraldBoots), new Object[] { "X0X", "X0X", "000", 'X', Item.emerald }); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } @EventHandler public void serverStarting(FMLServerStartingEvent event) { } }
EmeraldHelmet:
package net.spideynn.emeraldarmor; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class EmeraldHelmet extends ItemArmor { public final int renderIndex() { return 3; } public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { return true; } public final int armorType() { return 0; } public EmeraldHelmet(int i, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par4, par2EnumArmorMaterial, par3, par4); this.setCreativeTab(CreativeTabs.tabCombat); } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("ea:emeraldHelmet"); } public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) { } public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { return "ea:EmeraldArmor.png"; } }
EmeraldChestplate:
package net.spideynn.emeraldarmor; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class EmeraldChestplate extends ItemArmor { public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { return true; } public final int armorType() { return 1; } public EmeraldChestplate(EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par4, par2EnumArmorMaterial, par3, par4); this.setCreativeTab(CreativeTabs.tabCombat); } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("ea:emeraldChest"); } public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) { } public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { return "ea:EmeraldArmor.png"; } }
EmeraldLeggings:
package net.spideynn.emeraldarmor; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class EmeraldLeggings extends ItemArmor { public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { return true; } public final int armorType() { return 2; } public EmeraldLeggings(EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par4, par2EnumArmorMaterial, par3, par4); this.setCreativeTab(CreativeTabs.tabCombat); } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("ea:emeraldLeggins"); } public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) { } public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { return "ea:EmeraldArmor.png"; } }
EmeraldBoots:
package net.spideynn.emeraldarmor; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class EmeraldBoots extends ItemArmor { public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { return true; } public final int armorType() { return 3; } public EmeraldBoots(EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par4, par2EnumArmorMaterial, par3, par4); this.setCreativeTab(CreativeTabs.tabCombat); } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon("ea:emeraldBoots"); } public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) { } public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) { return "ea:EmeraldArmor.png"; } }
ClientProxy:
package net.spideynn.emeraldarmor; import net.spideynn.emeraldarmor.CommonProxy; public class ClientProxy extends CommonProxy { @Override public void registerRenderers() { } }
CommonProxy:
package net.spideynn.emeraldarmor; public class CommonProxy { public void registerRenderers() { // Nothing here as the server doesn't render graphics or entities! } }
Any ideas why? (I'm new to Forge modding, I combined lots of tutorials to get this)
[1.7.10] Manipulating health regen.
in Modder Support
Posted
I'll try that, thanks!
Also, does anyone know where the naturalRegeneration class is? I got as far as world settings and GameRule.class.
EDIT: Found it: It's referenced in EntityPlayer and FoodStats