mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-23 21:39:47 +00:00
Readded remote jar and changed rendering
This commit is contained in:
1 parent
89386da4da
commit
7083c0a4c1
7 files changed
+86
-8
No files matched your search
@@ -0,0 +1,74 @@
|
||||
package makeo.gadomancy.client.models;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by makeo @ 23.10.2015 23:13
|
||||
*/
|
||||
public class ModelJarPot extends ModelBase {
|
||||
//fields
|
||||
ModelRenderer shape1;
|
||||
ModelRenderer shape2;
|
||||
ModelRenderer shape3;
|
||||
ModelRenderer shape4;
|
||||
ModelRenderer shape5;
|
||||
|
||||
public ModelJarPot() {
|
||||
textureWidth = 32;
|
||||
textureHeight = 64;
|
||||
|
||||
shape1 = new ModelRenderer(this, 0, 0);
|
||||
shape1.addBox(0F, 0F, 0F, 10, 0, 10);
|
||||
shape1.setRotationPoint(-5F, 24F, -5F);
|
||||
shape1.setTextureSize(32, 64);
|
||||
shape1.mirror = true;
|
||||
setRotation(shape1, 0F, 0F, 0F);
|
||||
shape2 = new ModelRenderer(this, 0, 28);
|
||||
shape2.addBox(0F, 0F, 0F, 1, 6, 12);
|
||||
shape2.setRotationPoint(-6F, 18F, -6F);
|
||||
shape2.setTextureSize(32, 64);
|
||||
shape2.mirror = true;
|
||||
setRotation(shape2, 0F, 0F, 0F);
|
||||
shape3 = new ModelRenderer(this, 0, 10);
|
||||
shape3.addBox(0F, 0F, 0F, 1, 6, 12);
|
||||
shape3.setRotationPoint(5F, 18F, -6F);
|
||||
shape3.setTextureSize(32, 64);
|
||||
shape3.mirror = true;
|
||||
setRotation(shape3, 0F, 0F, 0F);
|
||||
shape4 = new ModelRenderer(this, 0, 53);
|
||||
shape4.addBox(0F, 0F, 0F, 10, 6, 1);
|
||||
shape4.setRotationPoint(-5F, 18F, 5F);
|
||||
shape4.setTextureSize(32, 64);
|
||||
shape4.mirror = true;
|
||||
setRotation(shape4, 0F, 0F, 0F);
|
||||
shape5 = new ModelRenderer(this, 0, 46);
|
||||
shape5.addBox(0F, 0F, 0F, 10, 6, 1);
|
||||
shape5.setRotationPoint(-5F, 18F, -6F);
|
||||
shape5.setTextureSize(32, 64);
|
||||
shape5.mirror = true;
|
||||
setRotation(shape5, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
shape1.render(f5);
|
||||
shape2.render(f5);
|
||||
shape3.render(f5);
|
||||
shape4.render(f5);
|
||||
shape5.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package makeo.gadomancy.client.renderers.tile;
|
||||
|
||||
import makeo.gadomancy.client.models.ModelJarPot;
|
||||
import makeo.gadomancy.client.util.FakeWorld;
|
||||
import makeo.gadomancy.common.utils.SimpleResourceLocation;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -21,8 +22,8 @@ import thaumcraft.common.tiles.TileMirrorEssentia;
|
||||
* Created by makeo @ 14.10.2015 16:01
|
||||
*/
|
||||
public class RenderTileRemoteJar extends TileJarRenderer {
|
||||
private static final ModelJar MODEL_JAR = new ModelJar();
|
||||
private static final ResourceLocation OVERLAY_TEXTURE = new SimpleResourceLocation("models/jar_overlay.png");
|
||||
private static final ModelJarPot MODEL_JAR_POT = new ModelJarPot();
|
||||
private static final ResourceLocation OVERLAY_TEXTURE = new SimpleResourceLocation("models/jar_pot.png");
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partialTicks) {
|
||||
@@ -54,7 +55,11 @@ public class RenderTileRemoteJar extends TileJarRenderer {
|
||||
|
||||
GL11.glScalef(1.002f, 1f, 1.002f);
|
||||
|
||||
MODEL_JAR.renderAll();
|
||||
|
||||
GL11.glTranslatef(0, -1.5f, 0);
|
||||
//GL11.glRotatef(180, 1f, 0, 0);
|
||||
|
||||
MODEL_JAR_POT.render(null, 0f, 0f, 0f, 0f, 0f, 0.0625f);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopAttrib();
|
||||
|
||||
@@ -30,8 +30,7 @@ import java.util.List;
|
||||
*/
|
||||
public class BlockRemoteJar extends BlockJar {
|
||||
public BlockRemoteJar() {
|
||||
//setCreativeTab(RegisteredItems.creativeTab);
|
||||
setCreativeTab(null);
|
||||
setCreativeTab(RegisteredItems.creativeTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -109,7 +109,7 @@ public class RegisteredBlocks {
|
||||
registerStickyJar(ConfigBlocks.blockJar, 0, true, true);
|
||||
registerStickyJar(ConfigBlocks.blockJar, 3, true, true);
|
||||
|
||||
//registerStickyJar(RegisteredBlocks.blockRemoteJar, 0, false, false);
|
||||
registerStickyJar(RegisteredBlocks.blockRemoteJar, 0, false, false);
|
||||
}
|
||||
|
||||
private static List<StickyJarInfo> stickyJars = new ArrayList<StickyJarInfo>();
|
||||
|
||||
@@ -77,8 +77,8 @@ public class RegisteredItems {
|
||||
registerStickyJar(itemBlockJar, 0, new ItemStack(itemBlockJar, 1, 0));
|
||||
registerStickyJar(itemBlockJar, 3, new ItemStack(itemBlockJar, 1, 3));
|
||||
|
||||
//Item itemRemoteJar = Item.getItemFromBlock(RegisteredBlocks.blockRemoteJar);
|
||||
//registerStickyJar(itemRemoteJar, 0, new ItemStack(itemRemoteJar));
|
||||
Item itemRemoteJar = Item.getItemFromBlock(RegisteredBlocks.blockRemoteJar);
|
||||
registerStickyJar(itemRemoteJar, 0, new ItemStack(itemRemoteJar));
|
||||
}
|
||||
|
||||
private static List<StickyJarItemInfo> stickyJarItems = new ArrayList<StickyJarItemInfo>();
|
||||
|
||||
Reference in new issue
Block a user