Trying to build
This commit is contained in:
@@ -3,8 +3,10 @@ package nmd.primal.forgecraft;
|
|||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraftforge.fml.client.config.GuiConfigEntries;
|
import net.minecraftforge.fml.client.config.GuiConfigEntries;
|
||||||
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
import nmd.primal.forgecraft.init.ModBlocks;
|
||||||
import nmd.primal.forgecraft.init.ModItems;
|
import nmd.primal.forgecraft.init.ModItems;
|
||||||
//import nmd.primal.forgecraft.Item.ModItems;
|
//import nmd.primal.forgecraft.Item.ModItems;
|
||||||
|
|
||||||
@@ -18,7 +20,7 @@ public class ModInfo {
|
|||||||
public static final String MOD_NAME = "Kitsu's ForgeCraft";
|
public static final String MOD_NAME = "Kitsu's ForgeCraft";
|
||||||
//public static final String MOD_PREFIX = MOD_ID + ":";
|
//public static final String MOD_PREFIX = MOD_ID + ":";
|
||||||
//public static final String MOD_CHANNEL = MOD_ID;
|
//public static final String MOD_CHANNEL = MOD_ID;
|
||||||
public static final String MOD_VERSION = "0.0.0";
|
public static final String MOD_VERSION = "1.0.0";
|
||||||
public static final String MC_VERSIONS = "[1.9.4, 1.11.0)";
|
public static final String MC_VERSIONS = "[1.9.4, 1.11.0)";
|
||||||
|
|
||||||
/** Mod Structures **/
|
/** Mod Structures **/
|
||||||
@@ -73,7 +75,7 @@ public class ModInfo {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public Item getTabIconItem() {
|
public Item getTabIconItem() {
|
||||||
return ModItems.test;
|
return Item.getItemFromBlock(ModBlocks.firebox);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -12,6 +12,6 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
|||||||
public class ModCrafting {
|
public class ModCrafting {
|
||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.firebox), "XXX", "XYX", "XXX", 'X', Items.BRICK, 'Y', Blocks.FURNACE);
|
GameRegistry.addShapedRecipe(new ItemStack(ModBlocks.firebox), "X X", "XYX", "X X", 'X', Items.BRICK, 'Y', Blocks.FURNACE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,19 +16,19 @@ public class ModItems {
|
|||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
|
||||||
test = new ItemTest();
|
//test = new ItemTest();
|
||||||
//cheese = new ItemCheese();
|
//cheese = new ItemCheese();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
|
|
||||||
GameRegistry.register(test);
|
//GameRegistry.register(test);
|
||||||
//GameRegistry.register(cheese);
|
//GameRegistry.register(cheese);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerRenders() {
|
public static void registerRenders() {
|
||||||
//registerRender(cheese);
|
//registerRender(cheese);
|
||||||
registerRender(test);
|
//registerRender(test);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerRender(Item item) {
|
private static void registerRender(Item item) {
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ public class TileFireboxRender extends TileEntitySpecialRenderer<TileFirebox>
|
|||||||
private final RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
private final RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
|
||||||
private int rotation;
|
private int rotation;
|
||||||
private float translateX, translateZ;
|
private float translateX, translateZ;
|
||||||
|
private double textX, textZ;
|
||||||
private EntityItem entItem = null;
|
private EntityItem entItem = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -62,7 +63,7 @@ public class TileFireboxRender extends TileEntitySpecialRenderer<TileFirebox>
|
|||||||
//Left and Right
|
//Left and Right
|
||||||
translateX = 1.5f;
|
translateX = 1.5f;
|
||||||
//Back and Forth
|
//Back and Forth
|
||||||
translateZ = 0.5f;
|
translateZ = 0.9f;
|
||||||
break;
|
break;
|
||||||
case WEST:
|
case WEST:
|
||||||
rotation = 1;
|
rotation = 1;
|
||||||
@@ -84,90 +85,32 @@ public class TileFireboxRender extends TileEntitySpecialRenderer<TileFirebox>
|
|||||||
|
|
||||||
ItemStack stack = tile.getStackInSlot(0);
|
ItemStack stack = tile.getStackInSlot(0);
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
///
|
|
||||||
// rotate 90 degrees for blocks but not items?
|
|
||||||
///
|
|
||||||
boolean is_block = stack.getItem() instanceof ItemBlock;
|
boolean is_block = stack.getItem() instanceof ItemBlock;
|
||||||
float height = -0.855f;
|
float height = -0.75f;
|
||||||
|
|
||||||
float scale = is_block ? 0.9F : 1.8F;
|
float scale = is_block ? 0.9F : 1.6F;
|
||||||
int stackSize = stack.stackSize;
|
int stackSize = stack.stackSize;
|
||||||
|
|
||||||
//if(stackSize < 16){
|
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslatef(translateX, height, translateZ);
|
GL11.glTranslatef(translateX, height, translateZ);
|
||||||
GL11.glScalef(scale, scale, scale);
|
GL11.glScalef(scale, scale, scale);
|
||||||
GL11.glRotatef(90.0F * rotation, 0.0F, 1.0F, 0.0F);
|
GL11.glRotatef(90.0F * rotation, 0.0F, 1.0F, 0.0F);
|
||||||
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
Integer temp = tile.getStackInSlot(0).stackSize;
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
//}
|
|
||||||
/*if(stackSize > 15 && stackSize < 32){
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glTranslatef(translateX, height, translateZ);
|
|
||||||
GL11.glScalef(scale, scale, scale);
|
|
||||||
GL11.glRotatef(90.0F * rotation, 0.0F, 1.0F, 0.0F);
|
|
||||||
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
||||||
GL11.glPopMatrix();
|
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||||
|
//float scale = is_block ? 0.9F : 1.6F;
|
||||||
GL11.glPushMatrix();
|
if(is_block){
|
||||||
GL11.glTranslatef(translateX, height, translateZ);
|
GL11.glScalef(0.08F,0.08F, 0.08f);
|
||||||
GL11.glScalef(scale, scale, scale);
|
textZ = -23.0D;
|
||||||
GL11.glRotatef(90.0F * (rotation + 1), 0.0F, 1.0F, 0.0F);
|
} else {
|
||||||
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
GL11.glScalef(0.05F,0.05F, 0.05f);
|
||||||
GL11.glPopMatrix();
|
textZ = -22.0D;
|
||||||
}
|
}
|
||||||
if(stackSize > 31 && stackSize < 48){
|
GL11.glTranslatef(0.0F, 2.0f, 0.0F);
|
||||||
GL11.glPushMatrix();
|
GL11.glTranslated(0.0F, 0.0D, textZ);
|
||||||
GL11.glTranslatef(translateX, height, translateZ);
|
getFontRenderer().drawString(temp.toString(), 0, 0, 4210752);
|
||||||
GL11.glScalef(scale, scale, scale);
|
|
||||||
GL11.glRotatef(90.0F * rotation, 0.0F, 1.0F, 0.0F);
|
|
||||||
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glTranslatef(translateX, height, translateZ);
|
|
||||||
GL11.glScalef(scale, scale, scale);
|
|
||||||
GL11.glRotatef(90.0F * (rotation + 1), 0.0F, 1.0F, 0.0F);
|
|
||||||
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glTranslatef(translateX, height, translateZ);
|
|
||||||
GL11.glScalef(scale, scale, scale);
|
|
||||||
GL11.glRotatef(90.0F * (rotation + 2), 0.0F, 1.0F, 0.0F);
|
|
||||||
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
}
|
|
||||||
if(stackSize > 47){
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glTranslatef(translateX, height, translateZ);
|
|
||||||
GL11.glScalef(scale, scale, scale);
|
|
||||||
GL11.glRotatef(90.0F * rotation, 0.0F, 1.0F, 0.0F);
|
|
||||||
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glTranslatef(translateX, height, translateZ);
|
|
||||||
GL11.glScalef(scale, scale, scale);
|
|
||||||
GL11.glRotatef(90.0F * (rotation + 1), 0.0F, 1.0F, 0.0F);
|
|
||||||
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glTranslatef(translateX, height, translateZ);
|
|
||||||
GL11.glScalef(scale, scale, scale);
|
|
||||||
GL11.glRotatef(90.0F * (rotation + 2), 0.0F, 1.0F, 0.0F);
|
|
||||||
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glTranslatef(translateX, height, translateZ);
|
|
||||||
GL11.glScalef(scale, scale, scale);
|
|
||||||
GL11.glRotatef(90.0F * (rotation + 3), 0.0F, 1.0F, 0.0F);
|
|
||||||
renderItem.renderItem(stack, renderItem.getItemModelMesher().getItemModel(stack));
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, prevLGTX, prevLGTY);
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
item.test.name=test
|
item.test.name=test
|
||||||
tile.firebox.name=Firebox
|
tile.firebox.name=Firebox
|
||||||
|
itemGroup.forgecraft=ForgeCraft
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
[{
|
[{
|
||||||
"modid": "forgecraft",
|
"modid": "forgecraft",
|
||||||
"name": "Kitsu's Forgecraft",
|
"name": "Kitsu's Forgecraft",
|
||||||
"description": "Forge your Future",
|
"description": "Forged with sweat and blood",
|
||||||
"version": "${version}",
|
"version": "1.0.0",
|
||||||
"mcversion": "${mcversion}",
|
"mcversion": "1.10.2",
|
||||||
"url": "",
|
"url": "",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
"authorList": ["KitsuShadow"],
|
"authorList": ["KitsuShadow"],
|
||||||
"credits": "KitsuShadow, Fluid1C3, Ishvad, Sygmarr",
|
"credits": "KitsuShadow, Fluid1C3, Ishvad, Sygmarr, An Sar",
|
||||||
"logoFile": "assets/primal/textures/logo.png",
|
"logoFile": "assets/forgecraft/textures/logo.png",
|
||||||
"screenshots": [],
|
"screenshots": [],
|
||||||
"dependencies": []
|
"dependencies": []
|
||||||
}]
|
}]
|
||||||
Reference in New Issue
Block a user