mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-16 18:44:44 +00:00
SPark changer, terrasteel plate, fix spark entity render
This commit is contained in:
1 parent
c2470f80ee
commit
a67aeee496
10 files changed
+65
-23
No files matched your search
@@ -306,6 +306,8 @@ public final class ModelHandler {
|
||||
registerItemModel(ModBlocks.redStringInterceptor);
|
||||
registerItemModel(ModBlocks.redStringRelay);
|
||||
registerItemModel(ModBlocks.floatingSpecialFlower);
|
||||
registerItemModel(ModBlocks.sparkChanger);
|
||||
registerItemModel(ModBlocks.terraPlate);
|
||||
|
||||
registerItemModelAllMeta(Item.getItemFromBlock(ModBlocks.floatingFlower), EnumDyeColor.values().length);
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ public class RenderEventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onTextureStitch(TextureStitchEvent.Pre evt) {
|
||||
System.out.println("CALLING TEXTURE STITCH");
|
||||
alfPortalTex = IconHelper.forName(evt.map, "alfheimPortalInside", "blocks");
|
||||
lightRelayWorldIcon = IconHelper.forName(evt.map, "lightRelay1", "blocks");
|
||||
lightRelayWorldIconRed = IconHelper.forName(evt.map, "lightRelay3", "blocks");
|
||||
|
||||
@@ -25,6 +25,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
import vazkii.botania.client.core.handler.RenderEventHandler;
|
||||
import vazkii.botania.common.entity.EntitySpark;
|
||||
import vazkii.botania.common.item.ItemSpark;
|
||||
|
||||
@@ -81,7 +82,7 @@ public class RenderSparkBase<T extends Entity> extends RenderEntity {
|
||||
}
|
||||
|
||||
public TextureAtlasSprite getBaseIcon(T entity) {
|
||||
return ItemSpark.worldIcon;
|
||||
return RenderEventHandler.INSTANCE.sparkWorldIcon;
|
||||
}
|
||||
|
||||
public void colorSpinningIcon(T entity, float a) {
|
||||
@@ -110,7 +111,7 @@ public class RenderSparkBase<T extends Entity> extends RenderEntity {
|
||||
float f5 = 0.5F;
|
||||
float f6 = 0.25F;
|
||||
|
||||
p_77026_1_.getWorldRenderer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
|
||||
p_77026_1_.getWorldRenderer().begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_NORMAL);
|
||||
//p_77026_1_.getWorldRenderer().setBrightness(240);
|
||||
p_77026_1_.getWorldRenderer().pos(0.0F - f5, 0.0F - f6, 0.0D).tex(f, f3).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
p_77026_1_.getWorldRenderer().pos(f4 - f5, 0.0F - f6, 0.0D).tex(f1, f3).normal(0.0F, 1.0F, 0.0F).endVertex();
|
||||
|
||||
@@ -16,6 +16,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -41,23 +42,8 @@ public class RenderTileSparkChanger extends TileEntitySpecialRenderer {
|
||||
float s = 0.6F;
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.rotate(180F, 0F, 1F, 0F);
|
||||
|
||||
int renderPass = 0;
|
||||
// Minecraft.getMinecraft().getRenderItem().renderItemModel(stack); // todo 1.8
|
||||
// do {
|
||||
// IIcon icon = stack.getItem().getIcon(stack, renderPass);
|
||||
// if(icon != null) {
|
||||
// Color color = new Color(stack.getItem().getColorFromItemStack(stack, renderPass));
|
||||
// GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
// float f = icon.getMinU();
|
||||
// float f1 = icon.getMaxU();
|
||||
// float f2 = icon.getMinV();
|
||||
// float f3 = icon.getMaxV();
|
||||
// ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
// GlStateManager.color(1F, 1F, 1F);
|
||||
// }
|
||||
// renderPass++;
|
||||
// } while(renderPass < stack.getItem().getRenderPasses(stack.getItemDamage()));
|
||||
GlStateManager.translate(0.5, 0.5, 0);
|
||||
Minecraft.getMinecraft().getRenderItem().renderItem(stack, ItemCameraTransforms.TransformType.GROUND);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
|
||||
@@ -35,8 +35,6 @@ import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemSpark extends ItemMod implements ICraftAchievement, IManaGivingItem {
|
||||
|
||||
public static TextureAtlasSprite worldIcon;
|
||||
|
||||
public ItemSpark() {
|
||||
setUnlocalizedName(LibItemNames.SPARK);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "botania:threehigh",
|
||||
"textures": {
|
||||
"bottom": "botania:blocks/sparkChanger0",
|
||||
"top": "botania:blocks/sparkChanger1",
|
||||
"side": "botania:blocks/sparkChanger2"
|
||||
},
|
||||
"transform": "forge:default-block"
|
||||
},
|
||||
"variants": {
|
||||
"powered": {
|
||||
"true": {},
|
||||
"false": {}
|
||||
},
|
||||
"inventory": [{}]
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{
|
||||
"model": "botania:thinnerthanslab",
|
||||
"model": "botania:fourhigh",
|
||||
"textures": {
|
||||
"bottom": "botania:blocks/starfield0",
|
||||
"top": "botania:blocks/starfield1",
|
||||
@@ -13,7 +13,7 @@
|
||||
}
|
||||
}],
|
||||
"inventory": [{
|
||||
"model": "botania:thinnerthanslab",
|
||||
"model": "botania:fourhigh",
|
||||
"textures": {
|
||||
"bottom": "botania:blocks/starfield0",
|
||||
"top": "botania:blocks/starfield0",
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "botania:threehigh",
|
||||
"textures": {
|
||||
"bottom": "botania:blocks/terraPlate0",
|
||||
"top": "botania:blocks/terraPlate1",
|
||||
"side": "botania:blocks/terraPlate2"
|
||||
},
|
||||
"transform": "forge:default-block"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{}],
|
||||
"inventory": [{}]
|
||||
}
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"textures": {
|
||||
"particle": "#side"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"from": [ 0, 0, 0 ],
|
||||
"to": [ 16, 3, 16 ],
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#bottom", "cullface": "down" },
|
||||
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#top" },
|
||||
"north": { "uv": [ 0, 13, 16, 16 ], "texture": "#side", "cullface": "north" },
|
||||
"south": { "uv": [ 0, 13, 16, 16 ], "texture": "#side", "cullface": "south" },
|
||||
"west": { "uv": [ 0, 13, 16, 16 ], "texture": "#side", "cullface": "west" },
|
||||
"east": { "uv": [ 0, 13, 16, 16 ], "texture": "#side", "cullface": "east" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user