Proxies don't require code in them.... they can have ANY code in them. Proxies are just another way to split your code up for the client and server.
I can second this. for the longest time my more swords mod did not use the proxies. I actually only started using them 3-4 weeks ago. I had them just never used them.
Too save everyone pain I will include my moreswordsmod client and common proxy
CommonProxy
package darkhax.moreswordsmod.server;
public class MSMCommonProxy{
}
ClientProxy
package darkhax.moreswordsmod.client;
public class MSMClientProxy extends MSMCommonProxy{
}
and then in my @Mod I have this
@SidedProxy(serverSide="darkhax.moreswordsmod.server.MSMCommonProxy", clientSide="darkhax.moreswordsmod.client.MSMClientProxy")
public static darkhax.moreswordsmod.server.MSMCommonProxy proxy;
How do I make an item craftable when damaged like armor, because I'm trying to recycle items. Also what is the hand item for iron doors? Please help it works in Eclipse but not Minecraft.exe
How do I make an item craftable when damaged like armor, because I'm trying to recycle items. Also what is the hand item for iron doors? Please help it works in Eclipse but not Minecraft.exe
How are you doing it currently?
Rollback Post to RevisionRollBack
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
It doesnt work in regular minecraft but the IDE works. What is going on I have mcp 7.25 and forge 6.5.0.471. I cant recycle iron doors in minecraft.exe or recycle when items are dmaged with the minecraft luancher
It doesnt work in regular minecraft but the IDE works. What is going on I have mcp 7.25 and forge 6.5.0.471. I cant recycle iron doors in minecraft.exe or recycle when items are dmaged with the minecraft luancher
How are you installing your mod? Mods folder?
Rollback Post to RevisionRollBack
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
hey hello im new in this of modding i´m learnign with tutorials but i actually dont get to worck my pickaxe i dont know why ecplipse dont get me erros but in game there is no pickaxe y use de hook of emuhelper and the code in your tutorial but it dosent appear in the game help me please
public class danItemPickaxe extends ItemPickaxe
{
public danItemPickaxe(int itemID, EnumToolMaterial toolMaterial){
super(itemID,toolMaterial);
setItemName("Mytril axe");
this.setCreativeTab(CreativeTabs.tabBlock);
}
public String getTextureFile(){
return "/dan/Modding/textures/items.png";
}
}
base file
public class NewBlocks //NAME USED FOR CLASEE AS NEW BLOCK RECIPES NEW ITEM OR // ESPECIFY NEWBLOCKS(BLOCK) OR NEWBLOCKS(ITEM)
// FURNACE RECIPE
{
public static EnumToolMaterial MYTRIL = EnumHelper.addToolMaterial("MYTRIL", 3, 3000, 12F, 0, 50);
@Instance("NewBlocks")
public static NewBlocks instance;
@SidedProxy(clientSide="dan.Modding.client.NewBlocksClientProxy", serverSide="dan.Modding.common.NewBlocksCommonProxyClass")
public static NewBlocksCommonProxy proxy;
//ITEMS
public static Item MytrilItem;
public static Item MytrilFuel;
public static Item RefinedSuperResin;
public static Item MytrilPickaxe;
//TOOLS
//BLOCKS
public static Block MytrilOre;
public static Block SuperResin;
public static Block ImprovedGlass;
@init
MytrilPickaxe = (new danItemPickaxe(5009,MYTRIL)).setIconIndex(3).setItemName("Mytril axe
hey hello im new in this of modding i´m learnign with tutorials but i actually dont get to worck my pickaxe i dont know why ecplipse dont get me erros but in game there is no pickaxe y use de hook of emuhelper and the code in your tutorial but it dosent appear in the game help me please
public class danItemPickaxe extends ItemPickaxe
{
public danItemPickaxe(int itemID, EnumToolMaterial toolMaterial){
super(itemID,toolMaterial);
setItemName("Mytril axe");
this.setCreativeTab(CreativeTabs.tabBlock);
}
public String getTextureFile(){
return "/dan/Modding/textures/items.png";
}
}
base file
public class NewBlocks //NAME USED FOR CLASEE AS NEW BLOCK RECIPES NEW ITEM OR // ESPECIFY NEWBLOCKS(BLOCK) OR NEWBLOCKS(ITEM)
// FURNACE RECIPE
{
public static EnumToolMaterial MYTRIL = EnumHelper.addToolMaterial("MYTRIL", 3, 3000, 12F, 0, 50);
@Instance("NewBlocks")
public static NewBlocks instance;
@SidedProxy(clientSide="dan.Modding.client.NewBlocksClientProxy", serverSide="dan.Modding.common.NewBlocksCommonProxyClass")
public static NewBlocksCommonProxy proxy;
//ITEMS
public static Item MytrilItem;
public static Item MytrilFuel;
public static Item RefinedSuperResin;
public static Item MytrilPickaxe;
//TOOLS
//BLOCKS
public static Block MytrilOre;
public static Block SuperResin;
public static Block ImprovedGlass;
@init
MytrilPickaxe = (new danItemPickaxe(5009,MYTRIL)).setIconIndex(3).setItemName("Mytril axe
You probably should look at the basic Java tutorials on the internet before you try these. You have no methods at all and your init annotations are in the completely wrong place. Also, your missing the @Mod annotation.
I have a request.. i'm a beginner in develop for minecraft and i try to make a block that can break block in front of them. (Face 3)
My block changes the orientation of the texture depending on the player's viewpoint.
I don't know how to break the block that is in front of it when is activated by redstone.
This is my code.
Rompebloques.java
package alca259.rompebloques;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.src.ModLoader;
import cpw.mods.fml.common.Mod;
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.network.NetworkMod;@Mod(modid = "rompeBloques", name = "Rompe Bloques", version = "0.1 Alpha")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Rompebloques {
//Declaraciones de objetos y registros ML
public static final Block BlockDestructor = new BlockDestructor(200,0).setStepSound(Block.soundStoneFootstep).setBlockName("BlockDestructor").setHardness(2.0F).setResistance(2.0F).setLightValue(0.0F);
public static int BlockDestructorTop;
public static int BlockDestructorBottom;
public static int BlockDestructorFront;
@cpw.mods.fml.common.Mod.Init
public void Init(FMLInitializationEvent event) {
//Entradas de idioma y referencias a .class
//Asignar textura a todo el bloque
BlockDestructor.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/alca259/BlockDestructor.png");
//Textura especiales, según las caras
BlockDestructorTop = ModLoader.addOverride("/terrain.png", "/alca259/BlockDestructorTop.png");
BlockDestructorBottom = ModLoader.addOverride("/terrain.png", "/alca259/BlockDestructorBottom.png");
BlockDestructorFront = ModLoader.addOverride("/terrain.png", "/alca259/BlockDestructorFrontal.png"); //Registrar bloque en el juego
ModLoader.registerBlock(BlockDestructor);
//Darle nombre al bloque en el juego
ModLoader.addName(BlockDestructor, "Rompebloques");
//Añadir receta de fabricación
ModLoader.addRecipe(new ItemStack(Rompebloques.BlockDestructor, 1), new Object[] {
"XXX","XYZ","XXX",
Character.valueOf('X'), Block.stone,
Character.valueOf('Y'), Item.redstone,
Character.valueOf('Z'), Block.glass
});
}@cpw.mods.fml.common.Mod.PreInit
public void PreInit(FMLPreInitializationEvent event) {
//Código a ser pre-inicializado
}@cpw.mods.fml.common.Mod.PostInit
public void PostInit(FMLPostInitializationEvent event) {
//Código a ser post-inicializado
}
public String getVersion() {
return "1.4.7";
}}
BlockDestructor.java
package alca259.rompebloques;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.IBlockAccess;
public class BlockDestructor extends Block {
protected BlockDestructor(int par1, int par2) {
super(par1, par2, Material.rock);
this.setCreativeTab(CreativeTabs.tabBlock);
}
public int quantityDropped(int par1) {
return (1);
}
public int idDropped(int par1, Random par2Random, int par3) {
//Retornar bloques
return Rompebloques.BlockDestructor.blockID;
}
@Override
public int getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) {
int i1 = iblockaccess.getBlockMetadata(i, j, k);
//Bottom
if(l == 0) {
return Rompebloques.BlockDestructorBottom;
}
//Top
if(l == 1) {
return Rompebloques.BlockDestructorTop;
}
//Direccion desde la que se mira
if (l == i1) {
return Rompebloques.BlockDestructorFront;
}
//Resto de caras
return blockIndexInTexture;
}
/**
* Vista del objeto
*/
@Override
public int getBlockTextureFromSide(int i) {
switch (i) {
case 0:
return Rompebloques.BlockDestructorBottom;
case 1:
return Rompebloques.BlockDestructorTop;
case 3:
return Rompebloques.BlockDestructorFront;
default:
return blockIndexInTexture;
}
}
/**
* Esta funcion se encarga de poner la textura del bloque en funcion de la direccion en la que mire
*/
@Override
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving) {
int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
if (l == 0) {
world.setBlockMetadataWithNotify(i, j, k, 2);
}
if (l == 1) {
world.setBlockMetadataWithNotify(i, j, k, 5);
}
if (l == 2) {
world.setBlockMetadataWithNotify(i, j, k, 3);
}
if (l == 3) {
world.setBlockMetadataWithNotify(i, j, k, 4);
}
}
}
Can you help me with this? Thanks in advance.
I do know how to do it, however, I noticed your using ModLoader code. You should switch to pure Forge code as it allows for many different things ModLoader doesn't allow.
Rollback Post to RevisionRollBack
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
I take it you cant get his tutorials to work either?
all worcks but when i try to creat a tool it dosent appear in the game i search in every place of the internet for tutorials but all are for from mod loader or incomplete
You probably should look at the basic Java tutorials on the internet before you try these. You have no methods at all and your init annotations are in the completely wrong place. Also, your missing the @Mod annotation.
Why don't you two go and actually try to code for yourselves rather than look at tutorials for beginners... ?
the isnt the compete code i cut because the space all worcks in my mod exept for the tools ande emutool a try in every placin the init int preint adn no worcks also every tutorial of these and also not worck
all worcks but when i try to creat a tool it dosent appear in the game i search in every place of the internet for tutorials but all are for from mod loader or incomplete
the isnt the compete code i cut because the space all worcks in my mod exept for the tools ande emutool a try in every placin the init int preint adn no worcks also every tutorial of these and also not worck
That would be because you don't have the @Mod annotation.
I can second this. for the longest time my more swords mod did not use the proxies. I actually only started using them 3-4 weeks ago. I had them just never used them.
Too save everyone pain I will include my moreswordsmod client and common proxy
CommonProxy
ClientProxy
and then in my @Mod I have this
hopefully this will put an end to this.
Farewell everyone o/
How are you doing it currently?
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
Here is the code,
Everything looks fine.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
I know how to do that but I have to experiment with the code a little to get it to work perfectly.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
It doesnt work in regular minecraft but the IDE works. What is going on I have mcp 7.25 and forge 6.5.0.471. I cant recycle iron doors in minecraft.exe or recycle when items are dmaged with the minecraft luancher
How are you installing your mod? Mods folder?
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
my code
pickaxe
package dan.Modding.common;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemPickaxe;
public class danItemPickaxe extends ItemPickaxe
{
public danItemPickaxe(int itemID, EnumToolMaterial toolMaterial){
super(itemID,toolMaterial);
setItemName("Mytril axe");
this.setCreativeTab(CreativeTabs.tabBlock);
}
public String getTextureFile(){
return "/dan/Modding/textures/items.png";
}
}
base file
public class NewBlocks //NAME USED FOR CLASEE AS NEW BLOCK RECIPES NEW ITEM OR // ESPECIFY NEWBLOCKS(BLOCK) OR NEWBLOCKS(ITEM)
// FURNACE RECIPE
{
public static EnumToolMaterial MYTRIL = EnumHelper.addToolMaterial("MYTRIL", 3, 3000, 12F, 0, 50);
@Instance("NewBlocks")
public static NewBlocks instance;
@SidedProxy(clientSide="dan.Modding.client.NewBlocksClientProxy", serverSide="dan.Modding.common.NewBlocksCommonProxyClass")
public static NewBlocksCommonProxy proxy;
//ITEMS
public static Item MytrilItem;
public static Item MytrilFuel;
public static Item RefinedSuperResin;
public static Item MytrilPickaxe;
//TOOLS
//BLOCKS
public static Block MytrilOre;
public static Block SuperResin;
public static Block ImprovedGlass;
@init
MytrilPickaxe = (new danItemPickaxe(5009,MYTRIL)).setIconIndex(3).setItemName("Mytril axe
LanguageRegistry.addName(MytrilPickaxe, "Mytril axe");
I take it you cant get his tutorials to work either?
Farewell everyone o/
thanks god im not the only one not getting this tut to work
You probably should look at the basic Java tutorials on the internet before you try these. You have no methods at all and your init annotations are in the completely wrong place. Also, your missing the @Mod annotation.
Why don't you two go and actually try to code for yourselves rather than look at tutorials for beginners... ?
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
I do know how to do it, however, I noticed your using ModLoader code. You should switch to pure Forge code as it allows for many different things ModLoader doesn't allow.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
Request
all worcks but when i try to creat a tool it dosent appear in the game i search in every place of the internet for tutorials but all are for from mod loader or incomplete
the isnt the compete code i cut because the space all worcks in my mod exept for the tools ande emutool a try in every placin the init int preint adn no worcks also every tutorial of these and also not worck
That would be because you don't have the @Mod annotation.
In a later tutorial, perhaps even soon.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
In the .jar is that wrong?
package dan.Modding.common;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemPickaxe;
public class danItemPickaxe extends ItemPickaxe
{
public danItemPickaxe(int itemID, EnumToolMaterial toolMaterial){
super(itemID,toolMaterial);
setItemName("Mytril axe");
this.setCreativeTab(CreativeTabs.tabTools);
}
@Override
public String getTextureFile(){
return "/dan/Modding/textures/items.png";
}
}
XD yes, Simply put the mod in the zip file and then place it in .minecraft/mods folder.
Farewell everyone o/