mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 19:58:34 +01:00
finished the aura attraction cart
This commit is contained in:
parent
05b61e2ccb
commit
3eb1119c55
5 changed files with 39 additions and 1 deletions
|
@ -1,17 +1,46 @@
|
||||||
package de.ellpeck.naturesaura.entities.render;
|
package de.ellpeck.naturesaura.entities.render;
|
||||||
|
|
||||||
|
import de.ellpeck.naturesaura.NaturesAura;
|
||||||
import de.ellpeck.naturesaura.entities.EntityMoverMinecart;
|
import de.ellpeck.naturesaura.entities.EntityMoverMinecart;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
|
import net.minecraft.client.model.ModelBase;
|
||||||
|
import net.minecraft.client.model.ModelRenderer;
|
||||||
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.client.renderer.entity.RenderManager;
|
import net.minecraft.client.renderer.entity.RenderManager;
|
||||||
import net.minecraft.client.renderer.entity.RenderMinecart;
|
import net.minecraft.client.renderer.entity.RenderMinecart;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class RenderMoverMinecart extends RenderMinecart<EntityMoverMinecart> {
|
public class RenderMoverMinecart extends RenderMinecart<EntityMoverMinecart> {
|
||||||
|
|
||||||
|
private static final ResourceLocation RES = new ResourceLocation(NaturesAura.MOD_ID, "textures/models/mover_cart.png");
|
||||||
|
private final ModelMoverMinecart model = new ModelMoverMinecart();
|
||||||
|
|
||||||
public RenderMoverMinecart(RenderManager renderManagerIn) {
|
public RenderMoverMinecart(RenderManager renderManagerIn) {
|
||||||
super(renderManagerIn);
|
super(renderManagerIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void renderCartContents(EntityMoverMinecart cart, float partialTicks, IBlockState state) {
|
protected void renderCartContents(EntityMoverMinecart cart, float partialTicks, IBlockState state) {
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
GlStateManager.translate(0, 22 / 16F, 0);
|
||||||
|
GlStateManager.rotate(180, 1, 0, 0);
|
||||||
|
this.bindTexture(RES);
|
||||||
|
this.model.render();
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class ModelMoverMinecart extends ModelBase {
|
||||||
|
|
||||||
|
private final ModelRenderer box;
|
||||||
|
|
||||||
|
public ModelMoverMinecart() {
|
||||||
|
this.box = new ModelRenderer(this, 0, 0);
|
||||||
|
this.box.setTextureSize(64, 64);
|
||||||
|
this.box.addBox(0, 0, 0, 16, 24, 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void render() {
|
||||||
|
this.box.render(1 / 16F);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "naturesaura:items/mover_cart"
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
"pattern": [
|
"pattern": [
|
||||||
"EBE",
|
"EBE",
|
||||||
"SIS",
|
"SIS",
|
||||||
" C "
|
"XCX"
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"B": {
|
"B": {
|
||||||
|
@ -24,6 +24,9 @@
|
||||||
},
|
},
|
||||||
"C": {
|
"C": {
|
||||||
"item": "minecraft:minecart"
|
"item": "minecraft:minecart"
|
||||||
|
},
|
||||||
|
"X": {
|
||||||
|
"item": "naturesaura:infused_brick"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 358 B |
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Loading…
Reference in a new issue