Texture Path: mcp > temp > (new folder called 'mods') > (new folder w/ mod name) > (new folder called 'textures') > (new folders called 'blocks' & 'Items') > texturefiles(Block png's = 'blocks' folder, Item png's ='items' folder)
Blocks:
public Icon Texture;
public void registerIcons(IconRegistry, iconregistry)
{
this.Texture = iconregistry.registerIcon(FolderInMods:TextureFile);
}
public Icon getIcon(int par1)
{
return this.Texture;
}
Items:
public Icon Texture;
public void registerIcons(IconRegistry, iconregistry)
{
this.Texture = iconregistry.registerIcon(FolderInMods:TextureFile);
}
public Icon getIcon(int par1)
{
return this.Texture;
}
Multiple Items in one class:
public Icon Texture0;
public Icon Texture1;
public Icon Texture2;
public void registerIcons(IconRegistry, iconregistry)
{
this.Texture0 = iconregistry.registerIcon(FolderInMods:TextureFile);
this.Texture1 = iconregistry.registerIcon(FolderInMods:TextureFile);
this.Texture2 = iconregistry.registerIcon(FolderInMods:TextureFil);
}
public Icon getIcon(int par1)
{
if(this == modclass.theitem){
return this.Texture0;}
if(this == modclass.theitem){
return this.Texture1;}
if(this == modcalss.theitem){
return this.Texture2;}
return null;
}
Multi-Textured Blocks:
public Icon TextureTop;
public Icon TextureSide;
public Icon TextureFront;
public void registerIcons(IconRegistry, iconregistry)
{
this.TextureTop = iconregistry.registerIcon(FolderInMods:TextureFile);
this.TextureSide = iconregistry.registerIcon(FolderInMods:TextureFile);
this.TextureFront = iconregistry.registerIcon(FolderInMods:TextureFile);
}
public Icon getIcon(int par1, int par2)
{
int k = par2 & 7;
return par1 == k ? (k != 1 && k != 0 ? this.TextureFront : this.TextureFront) : (k != 1 && k != 0 ? (par1 != 1 && par1 != 0 ? this.TextureSide : this.TextureTop) : this.TextureTop);
}
My little but useful tricks:
Also 720p
Custom Creative Tab:
CustomTab.class:
public class CustomTutorialTab extends CreativeTabs
{
public static CreativeTabs TutorialTab = new CustomTutorialTab("Tutorial Modification Development Tab");
public CustomTutorialTab(String l)
{
super(l);
}
public ItemStack getIconItemStack()
{
return new ItemStack(mod_Technological_Revolution.Cable);
}
public String getTranslatedTabLabel()
{
return "Tutorial Modification Development Tab";
}
}
Placeable Items:
ItemPlaceable.class
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
if (par3World.getBlockId(par4, par5, par6) != Block.snow.blockID)
{
if (par7 == 0)
{
--par5;
}
if (par7 == 1)
{
++par5;
}
if (par7 == 2)
{
--par6;
}
if (par7 == 3)
{
++par6;
}
if (par7 == 4)
{
--par4;
}
if (par7 == 5)
{
++par4;
}
if (!par3World.isAirBlock(par4, par5, par6))
{
return false;
}
}
if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack))
{
return false;
}
else
{
if (Block.YourBlock.canPlaceBlockAt(par3World, par4, par5, par6))
{
--par1ItemStack.stackSize;
par3World.setBlock(par4, par5, par6, Block.YourBlock.blockID);
}
return true;
}
}
Custom Bow:
NOTE: Sorry for me ranting on about what you can spawn and can't, what you need to know is in the first 2-3 minutes, though there is more customization later on.
public class ItemTutorialBow extend ItemBow
{
//normal item code here:
}
GUI Series:
PART 1:
private Minecraft mc;
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float f, float g, float t)
{
mc = ModLoader.getMinecraftInstance();
mc.displayGuiScreen(new GuiYourGUI(world, player, mc));
return true;
}
PART 2:
public class GuiTutorial extends GuiScreen
{
private World worldMC;
private EntityPlayer entityP;
private Minecraft mineC;
public GuiTutorial(World world, EntityPlayer entityplayer, Minecraft minecraft)
{
worldMC = world;
entityP = entityplayer;
mineC = minecraft;
}
public void initGui()
{
buttonList.add(new GuiButton(0, width / 2 - 50, height / 2 - 50, 100, 20, "This is a Button!"));
}
protected void actionPerformed(GuiButton guiButton)
{
if(guiButton.id == 0)
{
this.mc.displayGuiScreen(new GuiIngameMenu());
}
}
}
PART 3:
public class GuiTutorial extends GuiScreen
{
private World worldMC;
private EntityPlayer entityP;
private Minecraft mineC;
public GuiTutorial(World world, EntityPlayer entityplayer, Minecraft minecraft)
{
worldMC = world;
entityP = entityplayer;
mineC = minecraft;
}
public void initGui()
{
buttonList.add(new GuiButton(0, width / 2 - 50, height / 2 - 50, 100, 20, "This is a Button!"));
}
protected void actionPerformed(GuiButton guiButton)
{
if(guiButton.id == 0)
{
this.drawCenteredString(fontRenderer, "This is a String!", width / 2 - 80, height / 2 - 80, 0xffffff);
}
}
public void drawScreen(int i, int j, float f)
{
this.drawDefaultBackground();
this.drawCenteredString(fontRenderer, "This is a String!", width / 2 - 80, height / 2 - 20, 0xffffff);
super.drawScreen(i, j, f);
}
}
Part 4:
Bigger text:
public void drawScreen(int i, int j, float f)
{
this.drawDefaultBackground();
GL11.glPushMatrix();
GL11.glScalef(2.0F, 2.0F, 2.0F);
this.drawCenteredString(fontRenderer, "This is a String!", width / 2 - 80, height / 2 - 20, 0xffffff);
GL11.glPopMatrix();
super.drawScreen(i, j, f);
}
Right Click:
---GuiScreenMod.class:
package mods.TechRev.marko5049.Tutorials;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
public class GuiScreenMod extends GuiScreen
{
private GuiButton selectedButton = null;
private int eventButton = 0;
private long field_85043_c = 0L;
private int field_92018_d = 0;
protected void mouseRClicked(int par1, int par2, int par3)
{
if (par3 == 1)
{
for (int l = 0; l < this.buttonList.size(); ++l)
{
GuiButton guibutton = (GuiButton)this.buttonList.get(l);
if (guibutton.mousePressed(this.mc, par1, par2))
{
this.selectedButton = guibutton;
this.mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
this.actionRPerformed(guibutton);
}
}
}
}
public void handleInput()
{
while (Mouse.next())
{
this.handleMouseInput();
}
while (Keyboard.next())
{
this.handleKeyboardInput();
}
}
public void handleMouseInput()
{
int i = Mouse.getEventX() * this.width / this.mc.displayWidth;
int j = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
if (Mouse.getEventButtonState())
{
if (this.mc.gameSettings.touchscreen && this.field_92018_d++ > 0)
{
return;
}
this.eventButton = Mouse.getEventButton();
this.field_85043_c = Minecraft.getSystemTime();
this.mouseRClicked(i, j, this.eventButton);
this.mouseClicked(i, j, this.eventButton);
}
else if (Mouse.getEventButton() != -1)
{
if (this.mc.gameSettings.touchscreen && --this.field_92018_d > 0)
{
return;
}
this.eventButton = -1;
this.mouseMovedOrUp(i, j, Mouse.getEventButton());
}
else if (this.eventButton != -1 && this.field_85043_c > 0L)
{
long k = Minecraft.getSystemTime() - this.field_85043_c;
this.func_85041_a(i, j, this.eventButton, k);
}
}
public void actionRPerformed(GuiButton guibutton) {}
}
---GuiTutorial.class:
public void actionRPerformed(GuiButton guiButton)
{
if(guiButton.id == 0)
{
this.drawCenteredString(fontRenderer, "This is a String!, Right", width / 2 - 80, height / 2 - 80, 0xffffff);
}
}
Excuse my spelling mistakes!
Don't forget to leave criticism, this will help me improve my tutorials.
Sorry for my inactiveness lately, I have had a handful of school work to deal with as well as dealing with my loving family.
Thanks so much for all the great support, my channel is about to reach 750 views and I can't wait.
I thank you all!
My new GUI tutorial is out, it shows you how to add right click to buttons and make the text in the GUI bigger or smaller.
I have had a mental black and I am running out of things to teach you guys in the GUI series, So if you have any please tell me!
Okay So I have just reached 100 channel views, which doesn't seem like a lot but to me it is a great start.
To celebrate this I will be making a whole bunch of tutorials over the next few weeks until I run out. And no, I will not be doing basic blocks and items! I will do intermediate and some advanced tutorials!
100 views!!! Yay, Thanks guys!
I'm looking forward to making these!
I have a poll going if you would like to vote for what i should do.
If you would like too, you are welcome to leave suggestions of what I could do.
From now on all my tutorials will be 720p (Not full HD), I hope this satisfies you guys. I am sorry that they aren't 1080p, but I have good but slow internet, so if it is 1080p it takes 6 to 16 hours to upload, where as 720p is 2 to 4 hours.
Great news guys, My channel has just reached 5 subs!!!
So little subs but so much motivation.
The channel is also about to reach 500 vies!! yay
I have recently uploaded ep.1 of the GUI series. and episode too is being uploaded right now!
Thanks for all the support guys.
enjoy and happy modding.
public BlockTrader(int par1, Material par2Material) {
super(par1, par2Material);
this.setCreativeTab(EsteticsPLUS.EsteticsPLUS);
}
@SideOnly(Side.CLIENT)
public Icon top;
public Icon bottom;
public Icon Side1;
public Icon Side2;
public Icon Side3;
public Icon Side4;
public Icon Main;
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister){
btw the error is that the textures doesnt show up ingame(yes i did put the textures in the jar and yes it is the correct names)
can you help me fix it if so please pm me
Here:
public Icon TextureTop;
public Icon TextureSide;
public Icon TextureFront;
public void registerIcons(IconRegistry, iconregistry)
{
this.TextureTop = iconregistry.registerIcon(FolderInMods:TextureFile);
this.TextureSide = iconregistry.registerIcon(FolderInMods:TextureFile);
this.TextureFront = iconregistry.registerIcon(FolderInMods:TextureFile);
}
public Icon getIcon(int par1, int par2)
{
int k = par2 & 7;
return par1 == k ? (k != 1 && k != 0 ? this.TextureFront : this.TextureFront) : (k != 1 && k != 0 ? (par1 != 1 && par1 != 0 ? this.TextureSide : this.TextureTop) : this.TextureTop);
}
Just have a look at my tutorial.
It will explain everything.
Sorry for my inactiveness lately, I have had a handful of school work to deal with as well as dealing with my loving family.
Thanks so much for all the great support, my channel is about to reach 750 views and I can't wait.
I thank you all!
My new GUI tutorial is out, it shows you how to add right click to buttons and make the text in the GUI bigger or smaller.
I have had a mental black and I am running out of things to teach you guys in the GUI series, So if you have any please tell me!
Important Information At Bottom.
Enjoy.
1.5+ Texturing:
Now 720p!
Texture Path:
mcp > temp > (new folder called 'mods') > (new folder w/ mod name) > (new folder called 'textures') > (new folders called 'blocks' & 'Items') > texturefiles(Block png's = 'blocks' folder, Item png's ='items' folder)
Blocks:
Items:
Multiple Items in one class:
Multi-Textured Blocks:
My little but useful tricks:
Also 720p
Custom Creative Tab:
CustomTab.class:
Placeable Items:
ItemPlaceable.class
Custom Bow:
NOTE: Sorry for me ranting on about what you can spawn and can't, what you need to know is in the first 2-3 minutes, though there is more customization later on.
GUI Series:
PART 1:
PART 2:
PART 3:
Part 4:
Bigger text:
Right Click:
---GuiScreenMod.class:
---GuiTutorial.class:
Excuse my spelling mistakes!
Don't forget to leave criticism, this will help me improve my tutorials.
Important Information:
-Weekly Update:
It's nice to know i helped you.
To celebrate this I will be making a whole bunch of tutorials over the next few weeks until I run out. And no, I will not be doing basic blocks and items! I will do intermediate and some advanced tutorials!
100 views!!! Yay, Thanks guys!
I'm looking forward to making these!
I have a poll going if you would like to vote for what i should do.
If you would like too, you are welcome to leave suggestions of what I could do.
From now on all my tutorials will be 720p (Not full HD), I hope this satisfies you guys. I am sorry that they aren't 1080p, but I have good but slow internet, so if it is 1080p it takes 6 to 16 hours to upload, where as 720p is 2 to 4 hours.
Thanks for the great support.
new videos should be out soon!
-Regards
marko5049
Coming soon...
Custom Bows!
Please can you give me the code, and tell me what the problem is.
-Regards
marko5049
That is great news!
Enjoy coding! =D
-Regards
marko5049
So little subs but so much motivation.
The channel is also about to reach 500 vies!! yay
I have recently uploaded ep.1 of the GUI series. and episode too is being uploaded right now!
Thanks for all the support guys.
enjoy and happy modding.
-Regards
marko5049
Here:
Just have a look at my tutorial.
It will explain everything.
-Regards
marko5049
Thanks so much for all the great support, my channel is about to reach 750 views and I can't wait.
I thank you all!
My new GUI tutorial is out, it shows you how to add right click to buttons and make the text in the GUI bigger or smaller.
I have had a mental black and I am running out of things to teach you guys in the GUI series, So if you have any please tell me!
-Regards
marko5049