Added tile entities, tile/entity placement guides, started working on
campfires
This commit is contained in:
parent
d5815eef50
commit
20b1dac4a6
|
|
@ -62,12 +62,29 @@ public class DisplayRenderUI
|
||||||
model_item.setModel(matrix_item);
|
model_item.setModel(matrix_item);
|
||||||
model_item.render();
|
model_item.render();
|
||||||
|
|
||||||
|
double damage = stack.item.getDamage(stack);
|
||||||
|
|
||||||
|
if(damage > 0)
|
||||||
|
{
|
||||||
|
Matrix4 matrix_damage = Matrix4.multiply(matrix_item, Matrix4.translate(0, -0.85 / 16, 0));
|
||||||
|
matrix_damage = Matrix4.multiply(Matrix4.scale(new Vec3d(damage * 0.85, 0.85 / 16, 0)), matrix_damage);
|
||||||
|
|
||||||
|
GL33.glUniform4f(Main.window.glsl_color,
|
||||||
|
1 - (float)MathHelpers.squared(1 - damage),
|
||||||
|
1 - (float)MathHelpers.squared(damage), 0, 1);
|
||||||
|
|
||||||
|
Models.UI_PIXEL_WHITE.setModel(matrix_damage);
|
||||||
|
Models.UI_PIXEL_WHITE.render();
|
||||||
|
|
||||||
|
GL33.glUniform4f(Main.window.glsl_color, 1, 1, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if(stack.count > 1)
|
if(stack.count > 1)
|
||||||
{
|
{
|
||||||
matrix_item = Matrix4.multiply(matrix, Matrix4.translate(i * offset + 0.25, 0.28125, 0));
|
Matrix4 matrix_text = Matrix4.multiply(matrix, Matrix4.translate(i * offset + 0.25, 0.28125, 0));
|
||||||
matrix_item = Matrix4.multiply(Matrix4.scale(new Vec3d(0.4, 0.4, 0.4)), matrix_item);
|
matrix_text = Matrix4.multiply(Matrix4.scale(new Vec3d(0.4, 0.4, 0.4)), matrix_text);
|
||||||
|
|
||||||
Text.render("" + stack.count, matrix_item);
|
Text.render("" + stack.count, matrix_text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ public abstract class Entity implements IBdfClassManager
|
||||||
this.pos = pos.copy();
|
this.pos = pos.copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Entity(BdfObject bdf) {
|
protected Entity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -223,6 +223,14 @@ public abstract class Entity implements IBdfClassManager
|
||||||
tile_back.tile.onWalkedOn(chunk, layer, tpos, this, tile_back);
|
tile_back.tile.onWalkedOn(chunk, layer, tpos, this, tile_back);
|
||||||
tile_front.tile.onWalkedOn(chunk, layer, tpos, this, tile_front);
|
tile_front.tile.onWalkedOn(chunk, layer, tpos, this, tile_front);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Move the player out of a solid area
|
||||||
|
while(!moveIsLegal(pos))
|
||||||
|
{
|
||||||
|
Vec2i tpos = pos.xz().toInt();
|
||||||
|
Vec2d direction = pos.xz().subtract(tpos.toDouble()).subtract(0.5).normalize();
|
||||||
|
pos = pos.add(direction.multiply(0.01).xny());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,6 @@ public class EntityBoss extends Entity implements IBossBar, EntityKillWithPartic
|
||||||
private long seed;
|
private long seed;
|
||||||
|
|
||||||
public EntityBoss(BdfObject bdf) {
|
public EntityBoss(BdfObject bdf) {
|
||||||
super(bdf);
|
|
||||||
|
|
||||||
BdfClassLoad(bdf);
|
BdfClassLoad(bdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,6 @@ public class EntityBullet extends EntityParticle
|
||||||
private double damage;
|
private double damage;
|
||||||
|
|
||||||
public EntityBullet(BdfObject bdf) {
|
public EntityBullet(BdfObject bdf) {
|
||||||
super(bdf);
|
|
||||||
|
|
||||||
BdfClassLoad(bdf);
|
BdfClassLoad(bdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@ public class EntityContainer extends Entity implements EntityHoldsEntities
|
||||||
private Entity[] entities;
|
private Entity[] entities;
|
||||||
|
|
||||||
public EntityContainer(BdfObject bdf) {
|
public EntityContainer(BdfObject bdf) {
|
||||||
super(bdf);
|
|
||||||
|
|
||||||
BdfClassLoad(bdf);
|
BdfClassLoad(bdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@ import projectzombie.model.Model;
|
||||||
public class EntityDummy extends Entity implements EntityAlive
|
public class EntityDummy extends Entity implements EntityAlive
|
||||||
{
|
{
|
||||||
public EntityDummy(BdfObject bdf) {
|
public EntityDummy(BdfObject bdf) {
|
||||||
super(bdf);
|
|
||||||
|
|
||||||
BdfClassLoad(bdf);
|
BdfClassLoad(bdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,6 @@ public class EntityExplosion extends Entity
|
||||||
private int radius;
|
private int radius;
|
||||||
|
|
||||||
public EntityExplosion(BdfObject bdf) {
|
public EntityExplosion(BdfObject bdf) {
|
||||||
super(bdf);
|
|
||||||
|
|
||||||
BdfClassLoad(bdf);
|
BdfClassLoad(bdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@ public class EntityGrapplingHook extends Entity
|
||||||
private Entity entity;
|
private Entity entity;
|
||||||
|
|
||||||
public EntityGrapplingHook(BdfObject bdf) {
|
public EntityGrapplingHook(BdfObject bdf) {
|
||||||
super(bdf);
|
|
||||||
|
|
||||||
BdfClassLoad(bdf);
|
BdfClassLoad(bdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,6 @@ public class EntityItem extends EntityParticle
|
||||||
private long age = 0;
|
private long age = 0;
|
||||||
|
|
||||||
public EntityItem(BdfObject bdf) {
|
public EntityItem(BdfObject bdf) {
|
||||||
super(bdf);
|
|
||||||
|
|
||||||
BdfClassLoad(bdf);
|
BdfClassLoad(bdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@ public abstract class EntityParticle extends Entity
|
||||||
public abstract int getParticleCount();
|
public abstract int getParticleCount();
|
||||||
public abstract EntityParticlePart getParticleAt(int id);
|
public abstract EntityParticlePart getParticleAt(int id);
|
||||||
|
|
||||||
public EntityParticle(BdfObject bdf) {
|
protected EntityParticle() {
|
||||||
super(bdf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityParticle(Vec3d pos, Vec3d velocity) {
|
public EntityParticle(Vec3d pos, Vec3d velocity) {
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,6 @@ public class EntityTnt extends Entity implements EntityHoldsEntities
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityTnt(BdfObject bdf) {
|
public EntityTnt(BdfObject bdf) {
|
||||||
super(bdf);
|
|
||||||
|
|
||||||
smoke_particles = new ParticleSmokeTrail(this);
|
smoke_particles = new ParticleSmokeTrail(this);
|
||||||
BdfClassLoad(bdf);
|
BdfClassLoad(bdf);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,8 @@ public class EntityZombie extends Entity implements EntityAlive, EntityKillWithP
|
||||||
protected boolean crossUnwalkable = false;
|
protected boolean crossUnwalkable = false;
|
||||||
private int walking_for = 0;
|
private int walking_for = 0;
|
||||||
|
|
||||||
public EntityZombie(BdfObject bdf) {
|
public EntityZombie(BdfObject bdf)
|
||||||
super(bdf);
|
{
|
||||||
|
|
||||||
// Set some settings
|
// Set some settings
|
||||||
hitbox = 0.5;
|
hitbox = 0.5;
|
||||||
isSolid = true;
|
isSolid = true;
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,12 @@ package projectzombie.entity.player;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL33;
|
||||||
|
|
||||||
import bdf.types.BdfNamedList;
|
import bdf.types.BdfNamedList;
|
||||||
import bdf.types.BdfObject;
|
import bdf.types.BdfObject;
|
||||||
import gl_engine.MathHelpers;
|
import gl_engine.MathHelpers;
|
||||||
|
import gl_engine.matrix.Matrix4;
|
||||||
import gl_engine.vec.Vec2d;
|
import gl_engine.vec.Vec2d;
|
||||||
import gl_engine.vec.Vec2i;
|
import gl_engine.vec.Vec2i;
|
||||||
import gl_engine.vec.Vec3d;
|
import gl_engine.vec.Vec3d;
|
||||||
|
|
@ -67,7 +70,6 @@ public class EntityPlayer extends Entity implements
|
||||||
private Vec2i last_chunk;
|
private Vec2i last_chunk;
|
||||||
|
|
||||||
public EntityPlayer(BdfObject bdf) {
|
public EntityPlayer(BdfObject bdf) {
|
||||||
super(bdf);
|
|
||||||
BdfClassLoad(bdf);
|
BdfClassLoad(bdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -262,12 +264,12 @@ public class EntityPlayer extends Entity implements
|
||||||
|
|
||||||
Layer layer = Main.world.getLayer();
|
Layer layer = Main.world.getLayer();
|
||||||
ItemStack is = inventory.getItem(inventory_hand);
|
ItemStack is = inventory.getItem(inventory_hand);
|
||||||
|
Vec2d place_pos = getPos().xz().add(MathHelpers.moveTowards2(0.5, Math.toRadians(angle)));
|
||||||
|
|
||||||
if(is.isEmpty() || !is.item.onPlayerLeftClick(is, Main.world.getLayer(), chunk, this))
|
if(is.isEmpty() || !is.item.onPlayerLeftClick(is, Main.world.getLayer(), this, place_pos))
|
||||||
{
|
{
|
||||||
ItemTool tool = (is.item instanceof ItemTool) ? (ItemTool) is.item : null;
|
ItemTool tool = (is.item instanceof ItemTool) ? (ItemTool) is.item : null;
|
||||||
|
Vec2i pos = place_pos.toInt();
|
||||||
Vec2i pos = getPos().xz().add(MathHelpers.moveTowards2(0.5, Math.toRadians(angle))).toInt();
|
|
||||||
|
|
||||||
for(int ti=0;ti<2;ti++)
|
for(int ti=0;ti<2;ti++)
|
||||||
{
|
{
|
||||||
|
|
@ -321,8 +323,9 @@ public class EntityPlayer extends Entity implements
|
||||||
if(dead || in_animation) return;
|
if(dead || in_animation) return;
|
||||||
|
|
||||||
ItemStack is = inventory.getItem(inventory_hand);
|
ItemStack is = inventory.getItem(inventory_hand);
|
||||||
|
Vec2d place_pos = getPos().xz().add(MathHelpers.moveTowards2(1, Math.toRadians(angle)));
|
||||||
|
|
||||||
if(is.isEmpty() || !is.item.onPlayerRightClick(is, Main.world.getLayer(), chunk, this)) {
|
if(is.isEmpty() || !is.item.onPlayerRightClick(is, Main.world.getLayer(), this, place_pos)) {
|
||||||
activateTile();
|
activateTile();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -394,6 +397,46 @@ public class EntityPlayer extends Entity implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void render()
|
||||||
|
{
|
||||||
|
Model model = getModel();
|
||||||
|
model.setModel(Matrix4.identity());
|
||||||
|
model.render();
|
||||||
|
|
||||||
|
ItemStack holding = inventory.getItem(inventory_hand);
|
||||||
|
|
||||||
|
if(holding != null && !holding.isEmpty())
|
||||||
|
{
|
||||||
|
Vec3d ppos = getPos();
|
||||||
|
|
||||||
|
Model model_place = holding.item.getPlaceModel(holding);
|
||||||
|
Model model_spawn = holding.item.getSpawnModel(holding);
|
||||||
|
Vec2d pos = ppos.xz().add(MathHelpers.moveTowards2(1, Math.toRadians(angle)));
|
||||||
|
|
||||||
|
if(model_place != null || model_spawn != null)
|
||||||
|
{
|
||||||
|
GL33.glUniform4f(Main.window.glsl_color, 0.5f, 0.75f, 0.5f, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(model_place != null)
|
||||||
|
{
|
||||||
|
model_place.setModel(Matrix4.translate(Math.floor(pos.x) - ppos.x + 0.5, 0, Math.floor(pos.y) - ppos.z + 0.5));
|
||||||
|
model_place.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(model_spawn != null)
|
||||||
|
{
|
||||||
|
model_spawn.setModel(Matrix4.translate(pos.x - ppos.x, 0, pos.y - ppos.z));
|
||||||
|
model_spawn.render();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(model_place != null || model_spawn != null)
|
||||||
|
{
|
||||||
|
GL33.glUniform4f(Main.window.glsl_color, 1, 1, 1, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int bloodParticles() {
|
public int bloodParticles() {
|
||||||
return 12;
|
return 12;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package projectzombie.entity.tileentity;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2i;
|
||||||
|
import gl_engine.vec.Vec3d;
|
||||||
|
import projectzombie.entity.Entity;
|
||||||
|
import projectzombie.init.Models;
|
||||||
|
import projectzombie.model.IModel;
|
||||||
|
|
||||||
|
public abstract class TileEntity extends Entity
|
||||||
|
{
|
||||||
|
public TileEntity(Vec2i pos) {
|
||||||
|
super(new Vec3d(pos.x, 0, pos.y), new Vec3d(0, 0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected TileEntity() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IModel getModel() {
|
||||||
|
return Models.EMPTY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package projectzombie.entity.tileentity;
|
||||||
|
|
||||||
|
import bdf.types.BdfObject;
|
||||||
|
import gl_engine.vec.Vec2i;
|
||||||
|
import projectzombie.world.chunk.Chunk;
|
||||||
|
import projectzombie.world.layer.Layer;
|
||||||
|
|
||||||
|
public class TileEntityCampfire extends TileEntity
|
||||||
|
{
|
||||||
|
public TileEntityCampfire(BdfObject bdf) {
|
||||||
|
BdfClassLoad(bdf);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TileEntityCampfire(Vec2i pos) {
|
||||||
|
super(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tick(Chunk chunk, Layer layer) {
|
||||||
|
super.tick(chunk, layer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ import projectzombie.entity.EntityTnt;
|
||||||
import projectzombie.entity.EntityZombie;
|
import projectzombie.entity.EntityZombie;
|
||||||
import projectzombie.entity.EntityZombieArmored;
|
import projectzombie.entity.EntityZombieArmored;
|
||||||
import projectzombie.entity.player.EntityPlayer;
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
|
import projectzombie.entity.tileentity.TileEntityCampfire;
|
||||||
|
|
||||||
public class Entities
|
public class Entities
|
||||||
{
|
{
|
||||||
|
|
@ -47,5 +48,6 @@ public class Entities
|
||||||
register(EntityBoss.class);
|
register(EntityBoss.class);
|
||||||
register(EntityPlayer.class);
|
register(EntityPlayer.class);
|
||||||
register(EntityContainer.class);
|
register(EntityContainer.class);
|
||||||
|
register(TileEntityCampfire.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import java.util.ArrayList;
|
||||||
import projectzombie.items.Item;
|
import projectzombie.items.Item;
|
||||||
import projectzombie.items.ItemAcorn;
|
import projectzombie.items.ItemAcorn;
|
||||||
import projectzombie.items.ItemAmmo;
|
import projectzombie.items.ItemAmmo;
|
||||||
|
import projectzombie.items.ItemCampfire;
|
||||||
import projectzombie.items.ItemEmpty;
|
import projectzombie.items.ItemEmpty;
|
||||||
import projectzombie.items.ItemFlare;
|
import projectzombie.items.ItemFlare;
|
||||||
import projectzombie.items.ItemFlint;
|
import projectzombie.items.ItemFlint;
|
||||||
|
|
@ -33,29 +34,24 @@ public class Items
|
||||||
public static void init()
|
public static void init()
|
||||||
{
|
{
|
||||||
register(EMPTY);
|
register(EMPTY);
|
||||||
|
|
||||||
register(AMMO);
|
register(AMMO);
|
||||||
register(HEALTH_POTION);
|
register(HEALTH_POTION);
|
||||||
register(TNT);
|
register(TNT);
|
||||||
register(LANTERN);
|
register(LANTERN);
|
||||||
register(FLARE);
|
register(FLARE);
|
||||||
register(GRAPPLING_HOOK);
|
register(GRAPPLING_HOOK);
|
||||||
|
|
||||||
register(SPAWN_ZOMBIE);
|
register(SPAWN_ZOMBIE);
|
||||||
register(SPAWN_DUMMY);
|
register(SPAWN_DUMMY);
|
||||||
|
|
||||||
register(ROCK);
|
register(ROCK);
|
||||||
register(FLINT);
|
register(FLINT);
|
||||||
register(LOG);
|
register(LOG);
|
||||||
register(ACORN);
|
register(ACORN);
|
||||||
register(PLANT_FIBRE);
|
register(PLANT_FIBRE);
|
||||||
register(HEMP_SEED);
|
register(HEMP_SEED);
|
||||||
|
|
||||||
register(AMMO);
|
register(AMMO);
|
||||||
|
|
||||||
register(INFESTATION);
|
register(INFESTATION);
|
||||||
|
|
||||||
register(FLINT_HATCHET);
|
register(FLINT_HATCHET);
|
||||||
|
register(CAMPFIRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Item AMMO = new ItemAmmo();
|
public static final Item AMMO = new ItemAmmo();
|
||||||
|
|
@ -65,18 +61,15 @@ public class Items
|
||||||
public static final Item LANTERN = new ItemLantern();
|
public static final Item LANTERN = new ItemLantern();
|
||||||
public static final Item FLARE = new ItemFlare();
|
public static final Item FLARE = new ItemFlare();
|
||||||
public static final Item GRAPPLING_HOOK = new ItemGrapplingHook();
|
public static final Item GRAPPLING_HOOK = new ItemGrapplingHook();
|
||||||
|
|
||||||
public static final Item SPAWN_ZOMBIE = new ItemSpawnZombie();
|
public static final Item SPAWN_ZOMBIE = new ItemSpawnZombie();
|
||||||
public static final Item SPAWN_DUMMY = new ItemSpawnDummy();
|
public static final Item SPAWN_DUMMY = new ItemSpawnDummy();
|
||||||
|
|
||||||
public static final Item ROCK = new ItemRock();
|
public static final Item ROCK = new ItemRock();
|
||||||
public static final Item FLINT = new ItemFlint();
|
public static final Item FLINT = new ItemFlint();
|
||||||
public static final Item LOG = new ItemLog();
|
public static final Item LOG = new ItemLog();
|
||||||
public static final Item ACORN = new ItemAcorn();
|
public static final Item ACORN = new ItemAcorn();
|
||||||
public static final Item HEMP_SEED = new ItemHempSeed();
|
public static final Item HEMP_SEED = new ItemHempSeed();
|
||||||
public static final Item PLANT_FIBRE = new ItemPlantFibre();
|
public static final Item PLANT_FIBRE = new ItemPlantFibre();
|
||||||
|
public static final Item CAMPFIRE = new ItemCampfire();
|
||||||
public static final Item FLINT_HATCHET = new ItemFlintHatchet();
|
public static final Item FLINT_HATCHET = new ItemFlintHatchet();
|
||||||
|
|
||||||
public static final Item INFESTATION = new ItemInfestation();
|
public static final Item INFESTATION = new ItemInfestation();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ public class Models
|
||||||
public static final Model TILE_TREE = new ModelTree();
|
public static final Model TILE_TREE = new ModelTree();
|
||||||
public static final Model TILE_TREE_SNOW = new ModelTreeSnow();
|
public static final Model TILE_TREE_SNOW = new ModelTreeSnow();
|
||||||
|
|
||||||
|
public static final Model TILE_CAMPFIRE = new ModelCross(Resources.ATLAS.get("/tile/campfire.png"));
|
||||||
|
|
||||||
public static final Model TILE_SAPLING_1 = new ModelCross(Resources.ATLAS.get("/tile/sapling1.png"));
|
public static final Model TILE_SAPLING_1 = new ModelCross(Resources.ATLAS.get("/tile/sapling1.png"));
|
||||||
public static final Model TILE_SAPLING_2 = new ModelCross(Resources.ATLAS.get("/tile/sapling2.png"));
|
public static final Model TILE_SAPLING_2 = new ModelCross(Resources.ATLAS.get("/tile/sapling2.png"));
|
||||||
public static final Model TILE_SAPLING_3 = new ModelCross(Resources.ATLAS.get("/tile/sapling3.png"));
|
public static final Model TILE_SAPLING_3 = new ModelCross(Resources.ATLAS.get("/tile/sapling3.png"));
|
||||||
|
|
@ -103,11 +105,14 @@ public class Models
|
||||||
public static final ModelGui UI_BUTTON_PLAY_HOVER = new ModelGui(Resources.ATLAS.get("/gui/button_play_hover.png"), new Vec2d(1.875, 1.875));
|
public static final ModelGui UI_BUTTON_PLAY_HOVER = new ModelGui(Resources.ATLAS.get("/gui/button_play_hover.png"), new Vec2d(1.875, 1.875));
|
||||||
public static final ModelGui UI_LABEL = new ModelGui(Resources.ATLAS.get("/gui/label.png"), new Vec2d(24, 3));
|
public static final ModelGui UI_LABEL = new ModelGui(Resources.ATLAS.get("/gui/label.png"), new Vec2d(24, 3));
|
||||||
public static final ModelGui UI_LABEL_RECIPE = new ModelGui(Resources.ATLAS.get("/gui/label_recipe.png"), new Vec2d(12, 3));
|
public static final ModelGui UI_LABEL_RECIPE = new ModelGui(Resources.ATLAS.get("/gui/label_recipe.png"), new Vec2d(12, 3));
|
||||||
public static final ModelGui UI_SELECTION_BOX_WIDE = new ModelGui(Resources.ATLAS.get("/gui/selection_box_wide.png"), new Vec2d(24, 12));
|
|
||||||
public static final ModelGui UI_SELECTION_BOX_BIG = new ModelGui(Resources.ATLAS.get("/gui/selection_box_big.png"), new Vec2d(12, 12));
|
|
||||||
public static final ModelGui UI_TEXT_BOX = new ModelGui(Resources.ATLAS.get("/gui/text_box.png"), new Vec2d(12, 1.5));
|
public static final ModelGui UI_TEXT_BOX = new ModelGui(Resources.ATLAS.get("/gui/text_box.png"), new Vec2d(12, 1.5));
|
||||||
public static final ModelGui UI_TEXT_CURSOR = new ModelGui(Resources.ATLAS.get("/gui/text_cursor.png"), 2, 50);
|
public static final ModelGui UI_TEXT_CURSOR = new ModelGui(Resources.ATLAS.get("/gui/text_cursor.png"), 2, 50);
|
||||||
|
|
||||||
|
public static final ModelGui UI_SELECTION_BOX_WIDE = new ModelGui(Resources.ATLAS.get("/gui/selection_box_wide.png"), new Vec2d(24, 12));
|
||||||
|
public static final ModelGui UI_SELECTION_BOX_CRAFTING = new ModelGui(Resources.ATLAS.get("/gui/selection_box_crafting.png"), new Vec2d(12, 12));
|
||||||
|
public static final ModelGui UI_SELECTION_BOX_STORAGE = new ModelGui(Resources.ATLAS.get("/gui/selection_box_storage.png"), new Vec2d(12, 12));
|
||||||
|
public static final ModelGui UI_ITEM_SLOT_STORAGE = new ModelGui(Resources.ATLAS.get("/gui/item_slot_storage.png"), new Vec2d(1.5, 1.5));
|
||||||
|
|
||||||
public static final ModelGui UI_HEALTH_FG = new ModelGui(Resources.ATLAS.get("/gui/health_full.png"), new Vec2d(6, 0.375));
|
public static final ModelGui UI_HEALTH_FG = new ModelGui(Resources.ATLAS.get("/gui/health_full.png"), new Vec2d(6, 0.375));
|
||||||
public static final ModelGui UI_HEALTH_BG = new ModelGui(Resources.ATLAS.get("/gui/health_empty.png"), new Vec2d(6, 0.375));
|
public static final ModelGui UI_HEALTH_BG = new ModelGui(Resources.ATLAS.get("/gui/health_empty.png"), new Vec2d(6, 0.375));
|
||||||
public static final ModelGui UI_ITEM_SLOTS = new ModelGui(Resources.ATLAS.get("/gui/hotbar.png"), new Vec2d(15, 1.5));
|
public static final ModelGui UI_ITEM_SLOTS = new ModelGui(Resources.ATLAS.get("/gui/hotbar.png"), new Vec2d(15, 1.5));
|
||||||
|
|
@ -126,6 +131,7 @@ public class Models
|
||||||
public static final ModelItem UI_SLOT_CLOTHING_BOOTS = new ModelItem(Resources.ATLAS.get("/gui/slot_clothing_boots.png"));
|
public static final ModelItem UI_SLOT_CLOTHING_BOOTS = new ModelItem(Resources.ATLAS.get("/gui/slot_clothing_boots.png"));
|
||||||
|
|
||||||
public static final ModelItem ITEM_EMPTY = ModelItem.createEmpty();
|
public static final ModelItem ITEM_EMPTY = ModelItem.createEmpty();
|
||||||
|
public static final ModelItem ITEM_CAMPFIRE = new ModelItem(Resources.ATLAS.get("/tile/campfire.png"));
|
||||||
public static final ModelItem ITEM_GRAPPLING_HOOK = new ModelItem(Resources.ATLAS.get("/item/grappling_hook.png"));
|
public static final ModelItem ITEM_GRAPPLING_HOOK = new ModelItem(Resources.ATLAS.get("/item/grappling_hook.png"));
|
||||||
public static final ModelItem ITEM_HEALTH_POTION = new ModelItem(Resources.ATLAS.get("/item/health_potion.png"));
|
public static final ModelItem ITEM_HEALTH_POTION = new ModelItem(Resources.ATLAS.get("/item/health_potion.png"));
|
||||||
public static final ModelItem ITEM_AMMO_BOX = new ModelItem(Resources.ATLAS.get("/item/ammo_box.png"));
|
public static final ModelItem ITEM_AMMO_BOX = new ModelItem(Resources.ATLAS.get("/item/ammo_box.png"));
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,14 @@ public class Recipes
|
||||||
Crafting.BASIC,
|
Crafting.BASIC,
|
||||||
}, new ItemStack(Items.FLINT_HATCHET, 1)));
|
}, new ItemStack(Items.FLINT_HATCHET, 1)));
|
||||||
|
|
||||||
|
recipies.add(new RecipeBasic(
|
||||||
|
new ItemStack[] {
|
||||||
|
new ItemStack(Items.LOG, 1),
|
||||||
|
new ItemStack(Items.ROCK, 1),
|
||||||
|
}, new Crafting[] {
|
||||||
|
Crafting.BASIC,
|
||||||
|
}, new ItemStack(Items.CAMPFIRE, 1)));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import java.util.ArrayList;
|
||||||
import projectzombie.tiles.Tile;
|
import projectzombie.tiles.Tile;
|
||||||
import projectzombie.tiles.TileBossPortal;
|
import projectzombie.tiles.TileBossPortal;
|
||||||
import projectzombie.tiles.TileCactus;
|
import projectzombie.tiles.TileCactus;
|
||||||
|
import projectzombie.tiles.TileCampfire;
|
||||||
import projectzombie.tiles.TileChest;
|
import projectzombie.tiles.TileChest;
|
||||||
import projectzombie.tiles.TileDirt;
|
import projectzombie.tiles.TileDirt;
|
||||||
import projectzombie.tiles.TileGrass;
|
import projectzombie.tiles.TileGrass;
|
||||||
|
|
@ -74,6 +75,7 @@ public class Tiles
|
||||||
register(GRASS_INFESTED);
|
register(GRASS_INFESTED);
|
||||||
register(TALL_GRASS);
|
register(TALL_GRASS);
|
||||||
register(SAPLING);
|
register(SAPLING);
|
||||||
|
register(CAMPFIRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Tile GRASS = new TileGrass();
|
public static final Tile GRASS = new TileGrass();
|
||||||
|
|
@ -103,4 +105,5 @@ public class Tiles
|
||||||
public static final Tile TALL_GRASS = new TileTallGrass();
|
public static final Tile TALL_GRASS = new TileTallGrass();
|
||||||
public static final Tile SAPLING = new TileSapling();
|
public static final Tile SAPLING = new TileSapling();
|
||||||
public static final Tile HEMP = new TileHemp();
|
public static final Tile HEMP = new TileHemp();
|
||||||
|
public static final Tile CAMPFIRE = new TileCampfire();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,13 @@ import gl_engine.MathHelpers;
|
||||||
import gl_engine.vec.Vec2d;
|
import gl_engine.vec.Vec2d;
|
||||||
import projectzombie.Main;
|
import projectzombie.Main;
|
||||||
import projectzombie.inventory.Crafting;
|
import projectzombie.inventory.Crafting;
|
||||||
|
import projectzombie.inventory.Inventory;
|
||||||
import projectzombie.menu.MenuGamePause;
|
import projectzombie.menu.MenuGamePause;
|
||||||
import projectzombie.menu.MenuInventory;
|
import projectzombie.menu.MenuInventory;
|
||||||
import projectzombie.menu.MenuInventoryBasic;
|
import projectzombie.menu.MenuInventoryBasic;
|
||||||
|
import projectzombie.menu.MenuInventoryStorage;
|
||||||
|
import projectzombie.menu.gui.GUIItemSlotGetter;
|
||||||
|
import projectzombie.util.math.ItemStack;
|
||||||
import projectzombie.world.chunk.ChunkEventHandler;
|
import projectzombie.world.chunk.ChunkEventHandler;
|
||||||
|
|
||||||
public class InputGame implements Input
|
public class InputGame implements Input
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,15 @@
|
||||||
package projectzombie.items;
|
package projectzombie.items;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
|
import gl_engine.vec.Vec2i;
|
||||||
|
import gl_engine.vec.Vec3d;
|
||||||
import projectzombie.entity.Entity;
|
import projectzombie.entity.Entity;
|
||||||
import projectzombie.entity.EntityHasInventory;
|
import projectzombie.entity.EntityHasInventory;
|
||||||
import projectzombie.entity.player.EntityPlayer;
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
|
import projectzombie.init.Models;
|
||||||
import projectzombie.inventory.IInventory;
|
import projectzombie.inventory.IInventory;
|
||||||
|
import projectzombie.items.modifier.ItemModifierDamage;
|
||||||
|
import projectzombie.model.Model;
|
||||||
import projectzombie.model.ModelItem;
|
import projectzombie.model.ModelItem;
|
||||||
import projectzombie.util.math.ItemStack;
|
import projectzombie.util.math.ItemStack;
|
||||||
import projectzombie.world.chunk.Chunk;
|
import projectzombie.world.chunk.Chunk;
|
||||||
|
|
@ -14,11 +20,11 @@ public abstract class Item
|
||||||
public int id;
|
public int id;
|
||||||
public int max = 99;
|
public int max = 99;
|
||||||
|
|
||||||
public boolean onPlayerLeftClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player) {
|
public boolean onPlayerLeftClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player) {
|
public boolean onPlayerRightClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -30,6 +36,14 @@ public abstract class Item
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Model getPlaceModel(ItemStack stack) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Model getSpawnModel(ItemStack stack) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public abstract ModelItem getModel(ItemStack stack);
|
public abstract ModelItem getModel(ItemStack stack);
|
||||||
|
|
||||||
public void onPickedUp(ItemStack stack, Layer layer, Chunk chunk, Entity entity)
|
public void onPickedUp(ItemStack stack, Layer layer, Chunk chunk, Entity entity)
|
||||||
|
|
@ -47,4 +61,15 @@ public abstract class Item
|
||||||
entity_i.addItem(stack);
|
entity_i.addItem(stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double getDamage(ItemStack stack)
|
||||||
|
{
|
||||||
|
ItemModifierDamage damage_modifier = (ItemModifierDamage)stack.getModifier(ItemModifierDamage.class);
|
||||||
|
|
||||||
|
if(damage_modifier == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (double)damage_modifier.getDamage() / (double)damage_modifier.getMaxDamage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
package projectzombie.items;
|
package projectzombie.items;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
import gl_engine.vec.Vec2i;
|
import gl_engine.vec.Vec2i;
|
||||||
|
import gl_engine.vec.Vec3d;
|
||||||
import projectzombie.entity.player.EntityPlayer;
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
import projectzombie.init.Models;
|
import projectzombie.init.Models;
|
||||||
import projectzombie.init.Tiles;
|
import projectzombie.init.Tiles;
|
||||||
|
import projectzombie.model.Model;
|
||||||
import projectzombie.model.ModelItem;
|
import projectzombie.model.ModelItem;
|
||||||
import projectzombie.tiles.Tile;
|
import projectzombie.tiles.Tile;
|
||||||
import projectzombie.util.math.ItemStack;
|
import projectzombie.util.math.ItemStack;
|
||||||
|
|
@ -24,13 +27,18 @@ public class ItemAcorn extends Item
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player) {
|
public Model getPlaceModel(ItemStack stack) {
|
||||||
|
return Models.TILE_SAPLING_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPlayerRightClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos)
|
||||||
|
{
|
||||||
|
Vec2i pos = place_pos.toInt();
|
||||||
|
Tile bt = layer.getBackTile(pos).tile;
|
||||||
|
|
||||||
Vec2i tpos = player.getPos().xz().toInt();
|
if((bt == Tiles.GRASS || bt == Tiles.SNOW) && layer.getFrontTile(pos).tile == Tiles.VOID) {
|
||||||
Tile bt = chunk.getBackTile(tpos).tile;
|
layer.setFrontTile(Tiles.SAPLING.getDefaultState(), pos);
|
||||||
|
|
||||||
if((bt == Tiles.GRASS || bt == Tiles.SNOW) && chunk.getFrontTile(tpos).tile == Tiles.VOID) {
|
|
||||||
chunk.setFrontTile(Tiles.SAPLING.getDefaultState(), tpos);
|
|
||||||
stack.count -= 1;
|
stack.count -= 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package projectzombie.items;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
|
import gl_engine.vec.Vec2i;
|
||||||
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
|
import projectzombie.init.Models;
|
||||||
|
import projectzombie.init.Tiles;
|
||||||
|
import projectzombie.model.Model;
|
||||||
|
import projectzombie.model.ModelItem;
|
||||||
|
import projectzombie.util.math.ItemStack;
|
||||||
|
import projectzombie.world.chunk.Chunk;
|
||||||
|
import projectzombie.world.layer.Layer;
|
||||||
|
|
||||||
|
public class ItemCampfire extends Item
|
||||||
|
{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ModelItem getModel(ItemStack stack) {
|
||||||
|
return Models.ITEM_CAMPFIRE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Model getPlaceModel(ItemStack stack) {
|
||||||
|
return Models.TILE_CAMPFIRE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName(ItemStack stack) {
|
||||||
|
return "Campfire";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPlayerRightClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos)
|
||||||
|
{
|
||||||
|
Vec2i pos = place_pos.toInt();
|
||||||
|
|
||||||
|
if(layer.getFrontTile(pos).tile != Tiles.VOID) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
stack.count -= 1;
|
||||||
|
layer.setFrontTile(Tiles.CAMPFIRE.getDefaultState(), pos);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package projectzombie.items;
|
package projectzombie.items;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
|
import gl_engine.vec.Vec2i;
|
||||||
|
import gl_engine.vec.Vec3d;
|
||||||
import projectzombie.entity.EntityFlare;
|
import projectzombie.entity.EntityFlare;
|
||||||
import projectzombie.entity.player.EntityPlayer;
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
import projectzombie.init.Models;
|
import projectzombie.init.Models;
|
||||||
|
|
@ -17,7 +20,7 @@ public class ItemFlare extends Item
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player) {
|
public boolean onPlayerRightClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos) {
|
||||||
layer.spawnEntity(new EntityFlare(player.getPos(), player.getVelocity(), player.angle));
|
layer.spawnEntity(new EntityFlare(player.getPos(), player.getVelocity(), player.angle));
|
||||||
stack.count -= 1;
|
stack.count -= 1;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package projectzombie.items;
|
package projectzombie.items;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
|
import gl_engine.vec.Vec2i;
|
||||||
|
import gl_engine.vec.Vec3d;
|
||||||
import projectzombie.entity.EntityGrapplingHook;
|
import projectzombie.entity.EntityGrapplingHook;
|
||||||
import projectzombie.entity.player.EntityPlayer;
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
import projectzombie.init.Models;
|
import projectzombie.init.Models;
|
||||||
|
|
@ -24,7 +27,7 @@ public class ItemGrapplingHook extends Item
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player)
|
public boolean onPlayerRightClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos)
|
||||||
{
|
{
|
||||||
layer.spawnEntity(new EntityGrapplingHook(player.getPos(), ItemModifierMeta.getStackMeta(stack), player));
|
layer.spawnEntity(new EntityGrapplingHook(player.getPos(), ItemModifierMeta.getStackMeta(stack), player));
|
||||||
stack.count -= 1;
|
stack.count -= 1;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package projectzombie.items;
|
package projectzombie.items;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
|
import gl_engine.vec.Vec2i;
|
||||||
|
import gl_engine.vec.Vec3d;
|
||||||
import projectzombie.entity.player.EntityPlayer;
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
import projectzombie.init.Models;
|
import projectzombie.init.Models;
|
||||||
import projectzombie.items.modifier.ItemModifierMeta;
|
import projectzombie.items.modifier.ItemModifierMeta;
|
||||||
|
|
@ -22,7 +25,7 @@ public class ItemHealthPotion extends Item
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player) {
|
public boolean onPlayerRightClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos) {
|
||||||
player.addHealth(ItemModifierMeta.getStackMeta(stack));
|
player.addHealth(ItemModifierMeta.getStackMeta(stack));
|
||||||
stack.count -= 1;
|
stack.count -= 1;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
package projectzombie.items;
|
package projectzombie.items;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
import gl_engine.vec.Vec2i;
|
import gl_engine.vec.Vec2i;
|
||||||
|
import gl_engine.vec.Vec3d;
|
||||||
import projectzombie.entity.player.EntityPlayer;
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
import projectzombie.init.Models;
|
import projectzombie.init.Models;
|
||||||
import projectzombie.init.Tiles;
|
import projectzombie.init.Tiles;
|
||||||
|
import projectzombie.model.Model;
|
||||||
import projectzombie.model.ModelItem;
|
import projectzombie.model.ModelItem;
|
||||||
import projectzombie.util.math.ItemStack;
|
import projectzombie.util.math.ItemStack;
|
||||||
import projectzombie.world.chunk.Chunk;
|
import projectzombie.world.chunk.Chunk;
|
||||||
|
|
@ -23,12 +26,17 @@ public class ItemHempSeed extends Item
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player) {
|
public Model getPlaceModel(ItemStack stack) {
|
||||||
|
return Models.TILE_HEMP[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPlayerRightClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos)
|
||||||
|
{
|
||||||
|
Vec2i pos = place_pos.toInt();
|
||||||
|
|
||||||
Vec2i tpos = player.getPos().xz().toInt();
|
if(layer.getBackTile(pos).tile == Tiles.GRASS && layer.getFrontTile(pos).tile == Tiles.VOID) {
|
||||||
|
layer.setFrontTile(Tiles.HEMP.getDefaultState(), pos);
|
||||||
if(chunk.getBackTile(tpos).tile == Tiles.GRASS && chunk.getFrontTile(tpos).tile == Tiles.VOID) {
|
|
||||||
chunk.setFrontTile(Tiles.HEMP.getDefaultState(), tpos);
|
|
||||||
stack.count -= 1;
|
stack.count -= 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package projectzombie.items;
|
package projectzombie.items;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
|
import gl_engine.vec.Vec2i;
|
||||||
|
import gl_engine.vec.Vec3d;
|
||||||
import projectzombie.entity.player.EntityPlayer;
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
import projectzombie.init.Models;
|
import projectzombie.init.Models;
|
||||||
import projectzombie.init.Tiles;
|
import projectzombie.init.Tiles;
|
||||||
|
|
@ -17,8 +20,8 @@ public class ItemInfestation extends Item
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player) {
|
public boolean onPlayerRightClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos) {
|
||||||
chunk.setBackTile(Tiles.GRASS_INFESTED.getDefaultState(), player.getPos().xz().toInt());
|
layer.setBackTile(Tiles.GRASS_INFESTED.getDefaultState(), place_pos.toInt());
|
||||||
stack.count -= 1;
|
stack.count -= 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
package projectzombie.items;
|
package projectzombie.items;
|
||||||
|
|
||||||
import gl_engine.MathHelpers;
|
import gl_engine.MathHelpers;
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
import gl_engine.vec.Vec2i;
|
import gl_engine.vec.Vec2i;
|
||||||
|
import gl_engine.vec.Vec3d;
|
||||||
import projectzombie.entity.player.EntityPlayer;
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
import projectzombie.init.Models;
|
import projectzombie.init.Models;
|
||||||
import projectzombie.init.Tiles;
|
import projectzombie.init.Tiles;
|
||||||
|
import projectzombie.model.Model;
|
||||||
import projectzombie.model.ModelItem;
|
import projectzombie.model.ModelItem;
|
||||||
import projectzombie.util.math.ItemStack;
|
import projectzombie.util.math.ItemStack;
|
||||||
import projectzombie.world.chunk.Chunk;
|
import projectzombie.world.chunk.Chunk;
|
||||||
|
|
@ -24,11 +27,17 @@ public class ItemLantern extends Item
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player)
|
public Model getPlaceModel(ItemStack stack) {
|
||||||
|
return Models.TILE_LANTERN;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPlayerRightClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos)
|
||||||
{
|
{
|
||||||
Vec2i tpos = new Vec2i(MathHelpers.floor(player.getPos().x), MathHelpers.floor(player.getPos().z));
|
Vec2i pos = place_pos.toInt();
|
||||||
if(layer.getFrontTile(tpos).tile == Tiles.VOID) {
|
|
||||||
layer.setFrontTile(Tiles.LANTERN.getDefaultState(), tpos);
|
if(layer.getFrontTile(pos).tile == Tiles.VOID) {
|
||||||
|
layer.setFrontTile(Tiles.LANTERN.getDefaultState(), pos);
|
||||||
stack.count -= 1;
|
stack.count -= 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package projectzombie.items;
|
package projectzombie.items;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
|
import gl_engine.vec.Vec2i;
|
||||||
import gl_engine.vec.Vec3d;
|
import gl_engine.vec.Vec3d;
|
||||||
import projectzombie.entity.player.EntityPlayer;
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
import projectzombie.util.math.ItemStack;
|
import projectzombie.util.math.ItemStack;
|
||||||
|
|
@ -9,13 +11,13 @@ import projectzombie.world.layer.Layer;
|
||||||
public abstract class ItemSpawn extends Item
|
public abstract class ItemSpawn extends Item
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player) {
|
public boolean onPlayerRightClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos) {
|
||||||
this.spawnEntity(layer, chunk, player.getPos(), player.getVelocity());
|
this.spawnEntity(layer, player.getPos(), player.getVelocity());
|
||||||
stack.count -= 1;
|
stack.count -= 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void spawnEntity(Layer layer, Chunk chunk, Vec3d pos, Vec3d velocity) {
|
public void spawnEntity(Layer layer, Vec3d pos, Vec3d velocity) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package projectzombie.items;
|
package projectzombie.items;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
|
import gl_engine.vec.Vec2i;
|
||||||
|
import gl_engine.vec.Vec3d;
|
||||||
import projectzombie.entity.EntityTnt;
|
import projectzombie.entity.EntityTnt;
|
||||||
import projectzombie.entity.player.EntityPlayer;
|
import projectzombie.entity.player.EntityPlayer;
|
||||||
import projectzombie.init.Models;
|
import projectzombie.init.Models;
|
||||||
|
|
@ -22,7 +25,7 @@ public class ItemTnt extends Item
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPlayerRightClick(ItemStack stack, Layer layer, Chunk chunk, EntityPlayer player) {
|
public boolean onPlayerRightClick(ItemStack stack, Layer layer, EntityPlayer player, Vec2d place_pos) {
|
||||||
layer.spawnEntity(new EntityTnt(player.getPos(), player.getVelocity(),
|
layer.spawnEntity(new EntityTnt(player.getPos(), player.getVelocity(),
|
||||||
player.angle, ItemModifierMeta.getStackMeta(stack), 5000));
|
player.angle, ItemModifierMeta.getStackMeta(stack), 5000));
|
||||||
stack.count -= 1;
|
stack.count -= 1;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,14 @@ public class ItemModifierDamage extends ItemModifier
|
||||||
BdfClassLoad(bdf);
|
BdfClassLoad(bdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getDamage() {
|
||||||
|
return damage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxDamage() {
|
||||||
|
return max;
|
||||||
|
}
|
||||||
|
|
||||||
public void repair() {
|
public void repair() {
|
||||||
damage = 0;
|
damage = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ public class ItemSpawnDummy extends ItemSpawn
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void spawnEntity(Layer layer, Chunk chunk, Vec3d pos, Vec3d velocity) {
|
public void spawnEntity(Layer layer, Vec3d pos, Vec3d velocity) {
|
||||||
chunk.spawnEntity(new EntityDummy(pos, velocity));
|
layer.spawnEntity(new EntityDummy(pos, velocity));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ public class ItemSpawnZombie extends ItemSpawn
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void spawnEntity(Layer layer, Chunk chunk, Vec3d pos, Vec3d velocity) {
|
public void spawnEntity(Layer layer, Vec3d pos, Vec3d velocity) {
|
||||||
chunk.spawnEntity(new EntityZombie(pos, velocity));
|
layer.spawnEntity(new EntityZombie(pos, velocity));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,14 +30,16 @@ public class MenuInventoryBasic extends MenuInventory
|
||||||
Models.UI_INVENTORY.getWidth() * 21 / 256.0,
|
Models.UI_INVENTORY.getWidth() * 21 / 256.0,
|
||||||
-Models.UI_INVENTORY.getHeight() * 127 / 256.0), new Vec2d(
|
-Models.UI_INVENTORY.getHeight() * 127 / 256.0), new Vec2d(
|
||||||
Models.UI_INVENTORY.getWidth() * 234 / 256.0,
|
Models.UI_INVENTORY.getWidth() * 234 / 256.0,
|
||||||
Models.UI_INVENTORY.getHeight() * 254 / 256.0), 100);
|
Models.UI_INVENTORY.getHeight() * 254 / 256.0),
|
||||||
|
recipies.length * Models.UI_LABEL_RECIPE.getHeight() *
|
||||||
|
36 / 34.0 - Models.UI_INVENTORY.getHeight());
|
||||||
|
|
||||||
for(int i=0;i<recipies.length;i++)
|
for(int i=0;i<recipies.length;i++)
|
||||||
{
|
{
|
||||||
Recipe recipe = recipies[i];
|
Recipe recipe = recipies[i];
|
||||||
|
|
||||||
GUIRecipeCard slot = new GUIRecipeCard(inventory, slider, recipe, tool, new Vec2d(0,
|
GUIRecipeCard slot = new GUIRecipeCard(inventory, slider, recipe, tool, new Vec2d(0,
|
||||||
Models.UI_SELECTION_BOX_BIG.getHeight() / 2 -
|
Models.UI_SELECTION_BOX_CRAFTING.getHeight() / 2 -
|
||||||
(i + 1) * Models.UI_LABEL_RECIPE.getHeight() * 36 / 34.0));
|
(i + 1) * Models.UI_LABEL_RECIPE.getHeight() * 36 / 34.0));
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -53,8 +55,8 @@ public class MenuInventoryBasic extends MenuInventory
|
||||||
Matrix4 matrix = Matrix4.translate(0, -Models.UI_INVENTORY.getHeight() / 2, 0);
|
Matrix4 matrix = Matrix4.translate(0, -Models.UI_INVENTORY.getHeight() / 2, 0);
|
||||||
|
|
||||||
// Render the inventory gui
|
// Render the inventory gui
|
||||||
Models.UI_SELECTION_BOX_BIG.setModel(matrix);
|
Models.UI_SELECTION_BOX_CRAFTING.setModel(matrix);
|
||||||
Models.UI_SELECTION_BOX_BIG.render();
|
Models.UI_SELECTION_BOX_CRAFTING.render();
|
||||||
|
|
||||||
super.render();
|
super.render();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,120 @@
|
||||||
|
package projectzombie.menu;
|
||||||
|
|
||||||
|
import gl_engine.matrix.Matrix4;
|
||||||
|
import gl_engine.vec.Vec2d;
|
||||||
|
import projectzombie.Main;
|
||||||
|
import projectzombie.init.Items;
|
||||||
|
import projectzombie.init.Models;
|
||||||
|
import projectzombie.init.Recipes;
|
||||||
|
import projectzombie.inventory.Crafting;
|
||||||
|
import projectzombie.inventory.Inventory;
|
||||||
|
import projectzombie.inventory.recipe.Recipe;
|
||||||
|
import projectzombie.menu.gui.GUIContainerSlider;
|
||||||
|
import projectzombie.menu.gui.GUIItemSlot;
|
||||||
|
import projectzombie.menu.gui.GUIItemSlotGetter;
|
||||||
|
import projectzombie.menu.gui.GUIRecipeCard;
|
||||||
|
import projectzombie.util.math.ItemStack;
|
||||||
|
|
||||||
|
public class MenuInventoryStorage extends MenuInventory
|
||||||
|
{
|
||||||
|
private GUIContainerSlider slider;
|
||||||
|
|
||||||
|
public MenuInventoryStorage(Menu parent, Inventory container)
|
||||||
|
{
|
||||||
|
this(parent, container, new GUIItemSlotGetter()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void setItemStack(ItemStack stack) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAllowed(ItemStack stack) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getItemStack() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public MenuInventoryStorage(Menu parent, Inventory container, GUIItemSlotGetter getter) {
|
||||||
|
super(parent);
|
||||||
|
|
||||||
|
double w = Models.UI_SELECTION_BOX_STORAGE.getWidth();
|
||||||
|
double h = Models.UI_SELECTION_BOX_STORAGE.getHeight();
|
||||||
|
|
||||||
|
slider = new GUIContainerSlider(new Vec2d(
|
||||||
|
w * 28 / 256.0, -h / 2), new Vec2d(
|
||||||
|
w * 192 / 256.0, h),
|
||||||
|
Math.floor(container.getSlotCount() / 6 + 1.5) *
|
||||||
|
1.5 - Models.UI_INVENTORY.getHeight());
|
||||||
|
|
||||||
|
for(int i=0;i<container.getSlotCount();i++)
|
||||||
|
{
|
||||||
|
int[] index = {i};
|
||||||
|
|
||||||
|
int col = i / 6;
|
||||||
|
int row = i % 6;
|
||||||
|
|
||||||
|
GUIItemSlot slot = new GUIItemSlot(1.5, true, new GUIItemSlotGetter() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setItemStack(ItemStack stack) {
|
||||||
|
container.setItem(stack, index[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAllowed(ItemStack stack) {
|
||||||
|
return getter.isAllowed(stack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getItemStack() {
|
||||||
|
return container.getItem(index[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isReadOnly() {
|
||||||
|
return getter.isReadOnly();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean mustTakeAll() {
|
||||||
|
return getter.mustTakeAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRemoveItemStack() {
|
||||||
|
getter.onRemoveItemStack();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean renderSlot() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
slot.setPos(new Vec2d(
|
||||||
|
w * 28.0 / 256.0 + 0.325 + w * row * 32 / 256.0,
|
||||||
|
-h * col * 32 / 256.0 - 1.175 + w / 2));
|
||||||
|
|
||||||
|
slider.add(slot);
|
||||||
|
}
|
||||||
|
|
||||||
|
gui.add(slider);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render()
|
||||||
|
{
|
||||||
|
Matrix4 matrix = Matrix4.translate(0, -Models.UI_INVENTORY.getHeight() / 2, 0);
|
||||||
|
|
||||||
|
// Render the inventory gui
|
||||||
|
Models.UI_SELECTION_BOX_STORAGE.setModel(matrix);
|
||||||
|
Models.UI_SELECTION_BOX_STORAGE.render();
|
||||||
|
|
||||||
|
super.render();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -18,13 +18,23 @@ public class GUIContainerSlider implements GUIComponent, GUIContainer
|
||||||
private double length;
|
private double length;
|
||||||
private double scroll = 0;
|
private double scroll = 0;
|
||||||
|
|
||||||
public GUIContainerSlider(Vec2d pos, Vec2d size, double length) {
|
public GUIContainerSlider(Vec2d pos, Vec2d size, double length)
|
||||||
|
{
|
||||||
|
if(length < 0) {
|
||||||
|
length = 0;
|
||||||
|
}
|
||||||
|
|
||||||
this.pos = pos;
|
this.pos = pos;
|
||||||
this.size = size;
|
this.size = size;
|
||||||
this.length = length;
|
this.length = length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLength(double length) {
|
public void setLength(double length)
|
||||||
|
{
|
||||||
|
if(length < 0) {
|
||||||
|
length = 0;
|
||||||
|
}
|
||||||
|
|
||||||
this.length = length;
|
this.length = length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package projectzombie.menu.gui;
|
package projectzombie.menu.gui;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL33;
|
||||||
|
|
||||||
|
import gl_engine.MathHelpers;
|
||||||
import gl_engine.matrix.Matrix4;
|
import gl_engine.matrix.Matrix4;
|
||||||
import gl_engine.vec.Vec2d;
|
import gl_engine.vec.Vec2d;
|
||||||
import gl_engine.vec.Vec3d;
|
import gl_engine.vec.Vec3d;
|
||||||
|
|
@ -35,6 +38,23 @@ public class GUIItemHolder implements GUIComponent
|
||||||
model.setModel(holding_matrix);
|
model.setModel(holding_matrix);
|
||||||
model.render();
|
model.render();
|
||||||
|
|
||||||
|
double damage = holding.item.getDamage(holding);
|
||||||
|
|
||||||
|
if(damage > 0)
|
||||||
|
{
|
||||||
|
Matrix4 matrix_damage = Matrix4.multiply(holding_matrix, Matrix4.translate(0, -0.85 / 16, 0));
|
||||||
|
matrix_damage = Matrix4.multiply(Matrix4.scale(new Vec3d(damage * 0.85, 0.85 / 16, 0)), matrix_damage);
|
||||||
|
|
||||||
|
GL33.glUniform4f(Main.window.glsl_color,
|
||||||
|
1 - (float)MathHelpers.squared(1 - damage),
|
||||||
|
1 - (float)MathHelpers.squared(damage), 0, 1);
|
||||||
|
|
||||||
|
Models.UI_PIXEL_WHITE.setModel(matrix_damage);
|
||||||
|
Models.UI_PIXEL_WHITE.render();
|
||||||
|
|
||||||
|
GL33.glUniform4f(Main.window.glsl_color, 1, 1, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if(holding.count > 1)
|
if(holding.count > 1)
|
||||||
{
|
{
|
||||||
Matrix4 text_matrix = Matrix4.multiply(holding_matrix, Matrix4.translate(-0.75 / 4, -0.75 / 4, 0));
|
Matrix4 text_matrix = Matrix4.multiply(holding_matrix, Matrix4.translate(-0.75 / 4, -0.75 / 4, 0));
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
package projectzombie.menu.gui;
|
package projectzombie.menu.gui;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL33;
|
||||||
|
|
||||||
|
import gl_engine.MathHelpers;
|
||||||
import gl_engine.matrix.Matrix4;
|
import gl_engine.matrix.Matrix4;
|
||||||
import gl_engine.vec.Vec2d;
|
import gl_engine.vec.Vec2d;
|
||||||
import gl_engine.vec.Vec3d;
|
import gl_engine.vec.Vec3d;
|
||||||
|
import projectzombie.Main;
|
||||||
import projectzombie.init.Models;
|
import projectzombie.init.Models;
|
||||||
import projectzombie.model.Model;
|
import projectzombie.model.Model;
|
||||||
import projectzombie.model.ModelItem;
|
import projectzombie.model.ModelItem;
|
||||||
|
|
@ -56,6 +60,12 @@ public class GUIItemSlot implements GUIComponent
|
||||||
matrix = Matrix4.multiply(Matrix4.translate(pos.x, pos.y, 0), matrix);
|
matrix = Matrix4.multiply(Matrix4.translate(pos.x, pos.y, 0), matrix);
|
||||||
Model model = stack.item.getModel(stack).getGuiModel();
|
Model model = stack.item.getModel(stack).getGuiModel();
|
||||||
|
|
||||||
|
if(getter.renderSlot())
|
||||||
|
{
|
||||||
|
Models.UI_ITEM_SLOT_STORAGE.setModel(Matrix4.multiply(matrix, Matrix4.translate(-0.325, -0.325, 0)));
|
||||||
|
Models.UI_ITEM_SLOT_STORAGE.render();
|
||||||
|
}
|
||||||
|
|
||||||
if(stack.isEmpty()) {
|
if(stack.isEmpty()) {
|
||||||
model = model_empty;
|
model = model_empty;
|
||||||
}
|
}
|
||||||
|
|
@ -78,6 +88,23 @@ public class GUIItemSlot implements GUIComponent
|
||||||
|
|
||||||
if(renderItem && !stack.isEmpty())
|
if(renderItem && !stack.isEmpty())
|
||||||
{
|
{
|
||||||
|
double damage = stack.item.getDamage(stack);
|
||||||
|
|
||||||
|
if(damage > 0)
|
||||||
|
{
|
||||||
|
Matrix4 matrix_damage = Matrix4.multiply(matrix, Matrix4.translate(0, -0.85 / 16, 0));
|
||||||
|
matrix_damage = Matrix4.multiply(Matrix4.scale(new Vec3d(damage * 0.85, 0.85 / 16, 0)), matrix_damage);
|
||||||
|
|
||||||
|
GL33.glUniform4f(Main.window.glsl_color,
|
||||||
|
1 - (float)MathHelpers.squared(1 - damage),
|
||||||
|
1 - (float)MathHelpers.squared(damage), 0, 1);
|
||||||
|
|
||||||
|
Models.UI_PIXEL_WHITE.setModel(matrix_damage);
|
||||||
|
Models.UI_PIXEL_WHITE.render();
|
||||||
|
|
||||||
|
GL33.glUniform4f(Main.window.glsl_color, 1, 1, 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
if(stack.count > 1)
|
if(stack.count > 1)
|
||||||
{
|
{
|
||||||
Matrix4 text_matrix = Matrix4.multiply(matrix, Matrix4.translate(-0.75 / 4, -0.75 / 4, 0));
|
Matrix4 text_matrix = Matrix4.multiply(matrix, Matrix4.translate(-0.75 / 4, -0.75 / 4, 0));
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,8 @@ public interface GUIItemSlotGetter {
|
||||||
public default boolean isReadOnly() {
|
public default boolean isReadOnly() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public default boolean renderSlot() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package projectzombie.model;
|
package projectzombie.model;
|
||||||
|
|
||||||
|
import gl_engine.matrix.Matrix4;
|
||||||
import gl_engine.texture.TextureRef3D;
|
import gl_engine.texture.TextureRef3D;
|
||||||
|
|
||||||
public class ModelEmpty extends Model
|
public class ModelEmpty extends Model
|
||||||
|
|
@ -32,6 +33,10 @@ public class ModelEmpty extends Model
|
||||||
return new int[0];
|
return new int[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setModel(Matrix4 model) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render() {}
|
public void render() {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,4 +61,12 @@ public abstract class Tile
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract Model getModel(byte meta);
|
public abstract Model getModel(byte meta);
|
||||||
|
|
||||||
|
public void onGenerate(Layer layer, Chunk chunk, TileState state, Vec2i pos) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onDestroy(Layer layer, Chunk chunk, TileState state, Vec2i pos) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
package projectzombie.tiles;
|
||||||
|
|
||||||
|
import gl_engine.vec.Vec2i;
|
||||||
|
import projectzombie.entity.tileentity.TileEntityCampfire;
|
||||||
|
import projectzombie.init.Models;
|
||||||
|
import projectzombie.model.Model;
|
||||||
|
import projectzombie.util.math.TileState;
|
||||||
|
import projectzombie.world.chunk.Chunk;
|
||||||
|
import projectzombie.world.layer.Layer;
|
||||||
|
|
||||||
|
public class TileCampfire extends Tile
|
||||||
|
{
|
||||||
|
|
||||||
|
public TileCampfire() {
|
||||||
|
this.emitsLight = true;
|
||||||
|
this.tileSolid = true;
|
||||||
|
this.tileHitbox = 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double getLightLevel(TileState state, Vec2i pos) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Model getModel(byte meta) {
|
||||||
|
return Models.TILE_CAMPFIRE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGenerate(Layer layer, Chunk chunk, TileState state, Vec2i pos) {
|
||||||
|
super.onGenerate(layer, chunk, state, pos);
|
||||||
|
|
||||||
|
chunk.createTileEntity(pos, new TileEntityCampfire(pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy(Layer layer, Chunk chunk, TileState state, Vec2i pos) {
|
||||||
|
super.onDestroy(layer, chunk, state, pos);
|
||||||
|
|
||||||
|
chunk.destroyTileEntity(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package projectzombie.world;
|
package projectzombie.world;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.FloatBuffer;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
|
@ -102,15 +102,8 @@ public class World implements IBdfClassManager
|
||||||
public void render(Camera camera)
|
public void render(Camera camera)
|
||||||
{
|
{
|
||||||
// Render the world and the player
|
// Render the world and the player
|
||||||
if(!Main.player.dead)
|
if(!Main.player.dead) {
|
||||||
{
|
Main.player.render();
|
||||||
Vec3d ppos = Main.player.getPos();
|
|
||||||
Model model = Main.player.getModel();
|
|
||||||
|
|
||||||
model.setModel(Matrix4.translate(
|
|
||||||
ppos.x - Camera.camera.x - 0.5, ppos.y,
|
|
||||||
ppos.z - Camera.camera.y - 0.5));
|
|
||||||
model.render();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Re-generate the particle pool if the pool has changed
|
// Re-generate the particle pool if the pool has changed
|
||||||
|
|
@ -130,9 +123,9 @@ public class World implements IBdfClassManager
|
||||||
|
|
||||||
if(changed)
|
if(changed)
|
||||||
{
|
{
|
||||||
ByteBuffer pool = BufferUtils.createByteBuffer(pool_size * Model.SIZE * 16);
|
FloatBuffer pool = BufferUtils.createFloatBuffer(pool_size * Model.SIZE * 16);
|
||||||
|
|
||||||
loaded.render(camera, pool.asFloatBuffer(), 0);
|
loaded.render(camera, pool, 0);
|
||||||
|
|
||||||
if(pool_vao != 0) {
|
if(pool_vao != 0) {
|
||||||
GL33.glDeleteVertexArrays(pool_vao);
|
GL33.glDeleteVertexArrays(pool_vao);
|
||||||
|
|
@ -169,9 +162,9 @@ public class World implements IBdfClassManager
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ByteBuffer pool = BufferUtils.createByteBuffer(pool_particle_count * Model.SIZE * 16);
|
FloatBuffer pool = BufferUtils.createFloatBuffer(pool_particle_count * Model.SIZE * 16);
|
||||||
|
|
||||||
loaded.render(camera, pool.asFloatBuffer(), 0);
|
loaded.render(camera, pool, 0);
|
||||||
|
|
||||||
GL33.glBindVertexArray(pool_vao);
|
GL33.glBindVertexArray(pool_vao);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import projectzombie.entity.EntityKillWithParticles;
|
||||||
import projectzombie.entity.EntityParticle;
|
import projectzombie.entity.EntityParticle;
|
||||||
import projectzombie.entity.EntityParticlePart;
|
import projectzombie.entity.EntityParticlePart;
|
||||||
import projectzombie.entity.particle.ParticleBreak;
|
import projectzombie.entity.particle.ParticleBreak;
|
||||||
|
import projectzombie.entity.tileentity.TileEntity;
|
||||||
import projectzombie.init.Tiles;
|
import projectzombie.init.Tiles;
|
||||||
import projectzombie.model.IModel;
|
import projectzombie.model.IModel;
|
||||||
import projectzombie.model.Model;
|
import projectzombie.model.Model;
|
||||||
|
|
@ -473,6 +474,40 @@ public class Chunk implements IBdfClassManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void createTileEntity(Vec2i pos, TileEntity te)
|
||||||
|
{
|
||||||
|
TileEntity te_old = getTileEntity(pos);
|
||||||
|
|
||||||
|
// Kill the old tile entity if it exists
|
||||||
|
if(te_old != null) {
|
||||||
|
te_old.kill();
|
||||||
|
}
|
||||||
|
|
||||||
|
te.setPos(new Vec3d(pos.x, 0, pos.y));
|
||||||
|
spawnEntity(te);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void destroyTileEntity(Vec2i pos)
|
||||||
|
{
|
||||||
|
TileEntity te = getTileEntity(pos);
|
||||||
|
|
||||||
|
if(te != null) {
|
||||||
|
te.kill();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public TileEntity getTileEntity(Vec2i pos)
|
||||||
|
{
|
||||||
|
for(Entity e : entities)
|
||||||
|
{
|
||||||
|
if(e instanceof TileEntity && e.getPos().xz().toInt().equal(pos)) {
|
||||||
|
return (TileEntity)e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public void setBackTile(TileState tile, Vec2i pos)
|
public void setBackTile(TileState tile, Vec2i pos)
|
||||||
{
|
{
|
||||||
// Get the id
|
// Get the id
|
||||||
|
|
@ -491,6 +526,8 @@ public class Chunk implements IBdfClassManager
|
||||||
this.tiles_back_meta[id] = tile.meta;
|
this.tiles_back_meta[id] = tile.meta;
|
||||||
|
|
||||||
setDirty();
|
setDirty();
|
||||||
|
|
||||||
|
tile.tile.onGenerate(layer, this, tile, Vec2i.fromId(CHUNK_SIZE, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFrontTile(TileState tile, Vec2i pos)
|
public void setFrontTile(TileState tile, Vec2i pos)
|
||||||
|
|
@ -511,6 +548,8 @@ public class Chunk implements IBdfClassManager
|
||||||
this.tiles_front_meta[id] = tile.meta;
|
this.tiles_front_meta[id] = tile.meta;
|
||||||
|
|
||||||
setDirty();
|
setDirty();
|
||||||
|
|
||||||
|
tile.tile.onGenerate(layer, this, tile, Vec2i.fromId(CHUNK_SIZE, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
public TileState getBackTile(Vec2i pos)
|
public TileState getBackTile(Vec2i pos)
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,11 @@ import bdf.types.BdfObject;
|
||||||
import gl_engine.MathHelpers;
|
import gl_engine.MathHelpers;
|
||||||
import gl_engine.vec.Vec2d;
|
import gl_engine.vec.Vec2d;
|
||||||
import gl_engine.vec.Vec2i;
|
import gl_engine.vec.Vec2i;
|
||||||
|
import gl_engine.vec.Vec3d;
|
||||||
import projectzombie.Main;
|
import projectzombie.Main;
|
||||||
import projectzombie.display.Camera;
|
import projectzombie.display.Camera;
|
||||||
import projectzombie.entity.Entity;
|
import projectzombie.entity.Entity;
|
||||||
|
import projectzombie.entity.tileentity.TileEntity;
|
||||||
import projectzombie.init.LayerGenerators;
|
import projectzombie.init.LayerGenerators;
|
||||||
import projectzombie.util.math.TileState;
|
import projectzombie.util.math.TileState;
|
||||||
import projectzombie.util.math.map.Map2D;
|
import projectzombie.util.math.map.Map2D;
|
||||||
|
|
@ -120,6 +122,33 @@ public class Layer implements IBdfClassManager
|
||||||
return chunks.get(getChunkPosFromPos(pos));
|
return chunks.get(getChunkPosFromPos(pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void createTileEntity(Vec2i pos, TileEntity te)
|
||||||
|
{
|
||||||
|
// Get the chunk pos
|
||||||
|
Vec2i c_pos = getChunkPosFromPos(pos);
|
||||||
|
|
||||||
|
// Add the tile entity to that chunk
|
||||||
|
chunks.get(c_pos).createTileEntity(pos, te);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TileEntity getTileEntity(Vec2i pos)
|
||||||
|
{
|
||||||
|
// Get the chunk pos
|
||||||
|
Vec2i c_pos = getChunkPosFromPos(pos);
|
||||||
|
|
||||||
|
// Get the tile entity from that chunk
|
||||||
|
return chunks.get(c_pos).getTileEntity(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void destroyTileEntity(Vec2i pos)
|
||||||
|
{
|
||||||
|
// Get the chunk pos
|
||||||
|
Vec2i c_pos = getChunkPosFromPos(pos);
|
||||||
|
|
||||||
|
// Destroy the tile entity from that chunk
|
||||||
|
chunks.get(c_pos).destroyTileEntity(pos);
|
||||||
|
}
|
||||||
|
|
||||||
public void setBackTile(TileState tile, Vec2i pos)
|
public void setBackTile(TileState tile, Vec2i pos)
|
||||||
{
|
{
|
||||||
// Get the chunk pos
|
// Get the chunk pos
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ void main()
|
||||||
|
|
||||||
vec3 light_day = max(vec3(0), pSunDepth.z < (texture(depthmap, sunDepthTexPos).r * 2 - 1 + depth_c
|
vec3 light_day = max(vec3(0), pSunDepth.z < (texture(depthmap, sunDepthTexPos).r * 2 - 1 + depth_c
|
||||||
) ? lighting_day_high : lighting_day_low);
|
) ? lighting_day_high : lighting_day_low);
|
||||||
vec3 light_src = vec3(1, 1, 1) * (scaleLight(max(0, light.r)) - abs(pLightMapPos.y) * 0.1);
|
float light_src = scaleLight(max(0, light.r)) - abs(pLightMapPos.y) * 0.1;
|
||||||
vec4 rgb = vec4((pRGB % 64) / 64.0, ((pRGB >> 6) % 64) / 64.0, ((pRGB >> 12) % 64) / 64.0, 1);
|
vec4 rgb = vec4((pRGB % 64) / 64.0, ((pRGB >> 6) % 64) / 64.0, ((pRGB >> 12) % 64) / 64.0, 1);
|
||||||
|
|
||||||
vec4 color_grass = vec4(interpolate2RGB(
|
vec4 color_grass = vec4(interpolate2RGB(
|
||||||
|
|
@ -93,7 +93,7 @@ void main()
|
||||||
float fog = pCameraDepth;
|
float fog = pCameraDepth;
|
||||||
|
|
||||||
FragColor = (fog + (1 - fog) * textureRGB * (mod(int(pFlags / 4), 2) == 1 ? color_grass : vec4(1,1,1,1)) * color)
|
FragColor = (fog + (1 - fog) * textureRGB * (mod(int(pFlags / 4), 2) == 1 ? color_grass : vec4(1,1,1,1)) * color)
|
||||||
* vec4(biggest(light_day, light_src), pFade) * (mod(int(pFlags / 2), 2) == 1 ? rgb : vec4(1, 1, 1, 1))
|
* vec4(light_day + max(0, light_src), pFade) * (mod(int(pFlags / 2), 2) == 1 ? rgb : vec4(1, 1, 1, 1))
|
||||||
* saturation + contrast;
|
* saturation + contrast;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 593 B |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
|
|
@ -1,234 +1,237 @@
|
||||||
./tile/hemp6.png
|
./text/char_question.png
|
||||||
./tile/hemp7.png
|
./text/char_l_a.png
|
||||||
./tile/hemp1.png
|
./text/char_u_j.png
|
||||||
./tile/rock.png
|
./text/char_l_u.png
|
||||||
./tile/rock_ice.png
|
./text/char_u_s.png
|
||||||
./tile/sapling3.png
|
./text/char_l_s.png
|
||||||
./tile/ladder.png
|
./text/char_apostrophe.png
|
||||||
./tile/tree_leaves_snow.png
|
./text/char_plus.png
|
||||||
./tile/ice_wall.png
|
./text/char_l_e.png
|
||||||
./tile/water.png
|
./text/char_7.png
|
||||||
./tile/sandstone_wall.png
|
./text/char_minus.png
|
||||||
./tile/ladder_up.png
|
./text/char_u_r.png
|
||||||
./tile/cactus4.png
|
./text/char_u_l.png
|
||||||
./tile/tall_grass.png
|
./text/char_obracket.png
|
||||||
./tile/cactus2.png
|
./text/char_pow.png
|
||||||
./tile/grass_infested.png
|
./text/char_u_m.png
|
||||||
./tile/tree_branch_leaves.png
|
./text/char_l_t.png
|
||||||
./tile/dirt.png
|
./text/char_percent.png
|
||||||
./tile/wall.png
|
./text/char_l_y.png
|
||||||
./tile/tree_base.png
|
./text/char_0.png
|
||||||
./tile/cactus1.png
|
./text/char_4.png
|
||||||
./tile/sapling4.png
|
./text/char_l_r.png
|
||||||
./tile/hemp3.png
|
./text/char_l_m.png
|
||||||
./tile/cactus_top.png
|
./text/char_cbracket.png
|
||||||
./tile/tunnel_down.png
|
./text/char_u_g.png
|
||||||
./tile/stone.png
|
./text/char_u_q.png
|
||||||
./tile/snow.png
|
./text/char_u_i.png
|
||||||
./tile/boss_portal.png
|
./text/char_tilde.png
|
||||||
./tile/hemp4.png
|
./text/char_l_w.png
|
||||||
./tile/sand.png
|
./text/char_l_v.png
|
||||||
./tile/lantern.png
|
./text/char_fslash.png
|
||||||
./tile/ice.png
|
./text/char_u_p.png
|
||||||
./tile/sapling1.png
|
./text/char_gthan.png
|
||||||
./tile/chest.png
|
./text/char_8.png
|
||||||
./tile/hemp2.png
|
./text/char_unknown.png
|
||||||
./tile/hemp8.png
|
./text/char_and.png
|
||||||
./tile/cactus3.png
|
./text/char_osbracket.png
|
||||||
./tile/lava.png
|
./text/char_u_n.png
|
||||||
./tile/tree_leaves.png
|
./text/char_l_i.png
|
||||||
./tile/hemp5.png
|
./text/char_u_y.png
|
||||||
./tile/lava_flow.png
|
./text/char_l_p.png
|
||||||
./tile/grass.png
|
./text/char_lthan.png
|
||||||
./tile/tree_branch.png
|
./text/char_l_g.png
|
||||||
./tile/sandstone.png
|
./text/char_bslash.png
|
||||||
./tile/tree_branch_leaves_snow.png
|
./text/char_1.png
|
||||||
./tile/rock_sandstone.png
|
./text/char_u_z.png
|
||||||
./tile/sapling2.png
|
./text/char_l_f.png
|
||||||
|
./text/char_u_w.png
|
||||||
|
./text/char_9.png
|
||||||
|
./text/char_l_x.png
|
||||||
|
./text/char_ccbracket.png
|
||||||
|
./text/char_l_o.png
|
||||||
|
./text/char_equals.png
|
||||||
|
./text/char_l_d.png
|
||||||
|
./text/char_dollar.png
|
||||||
|
./text/char_hashtag.png
|
||||||
|
./text/char_l_q.png
|
||||||
|
./text/char_u_o.png
|
||||||
|
./text/char_6.png
|
||||||
|
./text/char_u_d.png
|
||||||
|
./text/char_u_e.png
|
||||||
|
./text/char_exclamation.png
|
||||||
|
./text/char_vertical.png
|
||||||
|
./text/char_ocbracket.png
|
||||||
|
./text/char_u_k.png
|
||||||
|
./text/char_u_c.png
|
||||||
|
./text/char_l_n.png
|
||||||
|
./text/char_semicolon.png
|
||||||
|
./text/char_u_b.png
|
||||||
|
./text/char_u_f.png
|
||||||
|
./text/char_l_h.png
|
||||||
|
./text/char_l_k.png
|
||||||
|
./text/char_u_t.png
|
||||||
|
./text/char_3.png
|
||||||
|
./text/char_u_v.png
|
||||||
|
./text/char_u_h.png
|
||||||
|
./text/char_quotation.png
|
||||||
|
./text/char_u_a.png
|
||||||
|
./text/char_l_b.png
|
||||||
|
./text/char_underscore.png
|
||||||
|
./text/char_u_x.png
|
||||||
|
./text/char_comma.png
|
||||||
|
./text/char_csbracket.png
|
||||||
|
./text/char_l_l.png
|
||||||
|
./text/char_5.png
|
||||||
|
./text/char_star.png
|
||||||
|
./text/char_colon.png
|
||||||
|
./text/char_l_z.png
|
||||||
|
./text/char_space.png
|
||||||
|
./text/char_2.png
|
||||||
|
./text/char_at.png
|
||||||
|
./text/char_grave.png
|
||||||
|
./text/char_l_j.png
|
||||||
|
./text/char_fullstop.png
|
||||||
|
./text/char_l_c.png
|
||||||
|
./text/char_u_u.png
|
||||||
./list.txt
|
./list.txt
|
||||||
./item/log.png
|
./player/player_white_front_moving.png
|
||||||
./item/rock.png
|
./player/player_white_back_moving.png
|
||||||
./item/acorn.png
|
./player/player_black_back_moving.png
|
||||||
./item/ammo_box.png
|
./player/player_black_back_still.png
|
||||||
./item/plant_fibre.png
|
|
||||||
./item/flint_hatchet.png
|
|
||||||
./item/hemp_seed.png
|
|
||||||
./item/shield_upgrade.png
|
|
||||||
./item/grappling_hook.png
|
|
||||||
./item/log_snow.png
|
|
||||||
./item/health_potion.png
|
|
||||||
./item/snow_pile.png
|
|
||||||
./item/gun_upgrade.png
|
|
||||||
./item/sandstone.png
|
|
||||||
./item/flint.png
|
|
||||||
./player/player_white_back_still.png
|
./player/player_white_back_still.png
|
||||||
./player/player_white_front_still.png
|
./player/player_white_front_still.png
|
||||||
./player/player_black_front_moving.png
|
./player/player_black_front_moving.png
|
||||||
./player/player_black_front_still.png
|
./player/player_black_front_still.png
|
||||||
./player/player_black_back_moving.png
|
./particle/smoke_trail.png
|
||||||
./player/player_black_back_still.png
|
./particle/water.png
|
||||||
./player/player_white_back_moving.png
|
./particle/smoke_0.png
|
||||||
./player/player_white_front_moving.png
|
./particle/smoke_1.png
|
||||||
./gui/selection_box_wide.png
|
./particle/blood.png
|
||||||
./gui/text_box.png
|
./particle/lava.png
|
||||||
./gui/pixel_white.png
|
./particle/bullet.png
|
||||||
./gui/water.png
|
./particle/smoke_2.png
|
||||||
./gui/gun.png
|
./particle/snow.png
|
||||||
./gui/button_delete.png
|
./particle/rain.png
|
||||||
./gui/button_delete_hover.png
|
./particle/smoke_4.png
|
||||||
./gui/slot_armor_chest.png
|
./particle/smoke_3.png
|
||||||
./gui/pixel_black.png
|
./particle/smoke_5.png
|
||||||
./gui/slot_clothing_shirt.png
|
|
||||||
./gui/button_play.png
|
|
||||||
./gui/slot_armor_legs.png
|
|
||||||
./gui/selection_box_big.png
|
|
||||||
./gui/inventory.png
|
|
||||||
./gui/label.png
|
|
||||||
./gui/slot_clothing_pants.png
|
|
||||||
./gui/health_empty.png
|
|
||||||
./gui/label_recipe.png
|
|
||||||
./gui/hotbar_selected.png
|
|
||||||
./gui/health_full.png
|
|
||||||
./gui/temperature.png
|
./gui/temperature.png
|
||||||
./gui/button_play_hover.png
|
./gui/slot_armor_chest.png
|
||||||
./gui/text_cursor.png
|
./gui/health_empty.png
|
||||||
./gui/slot_armor_helmet.png
|
|
||||||
./gui/slot_clothing_boots.png
|
|
||||||
./gui/hotbar.png
|
|
||||||
./gui/button_normal.png
|
|
||||||
./gui/shield.png
|
|
||||||
./gui/button_hover.png
|
./gui/button_hover.png
|
||||||
./text/char_bslash.png
|
./gui/item_slot_storage.png
|
||||||
./text/char_dollar.png
|
./gui/water.png
|
||||||
./text/char_l_w.png
|
./gui/slot_armor_legs.png
|
||||||
./text/char_u_d.png
|
./gui/button_normal.png
|
||||||
./text/char_u_t.png
|
./gui/label.png
|
||||||
./text/char_space.png
|
./gui/hotbar.png
|
||||||
./text/char_l_x.png
|
./gui/slot_armor_helmet.png
|
||||||
./text/char_l_k.png
|
./gui/selection_box_crafting.png
|
||||||
./text/char_6.png
|
./gui/button_delete.png
|
||||||
./text/char_unknown.png
|
./gui/text_cursor.png
|
||||||
./text/char_comma.png
|
./gui/inventory.png
|
||||||
./text/char_obracket.png
|
./gui/button_delete_hover.png
|
||||||
./text/char_u_w.png
|
./gui/button_play_hover.png
|
||||||
./text/char_7.png
|
./gui/health_full.png
|
||||||
./text/char_l_f.png
|
./gui/hotbar_selected.png
|
||||||
./text/char_vertical.png
|
./gui/slot_clothing_shirt.png
|
||||||
./text/char_plus.png
|
./gui/selection_box_storage.png
|
||||||
./text/char_u_a.png
|
./gui/pixel_white.png
|
||||||
./text/char_star.png
|
./gui/pixel_black.png
|
||||||
./text/char_9.png
|
./gui/slot_clothing_pants.png
|
||||||
./text/char_u_k.png
|
./gui/text_box.png
|
||||||
./text/char_grave.png
|
./gui/shield.png
|
||||||
./text/char_u_n.png
|
./gui/label_recipe.png
|
||||||
./text/char_percent.png
|
./gui/slot_clothing_boots.png
|
||||||
./text/char_u_m.png
|
./gui/selection_box_wide.png
|
||||||
./text/char_exclamation.png
|
./gui/gun.png
|
||||||
./text/char_1.png
|
./gui/button_play.png
|
||||||
./text/char_l_q.png
|
./tile/cactus4.png
|
||||||
./text/char_l_z.png
|
./tile/hemp1.png
|
||||||
./text/char_l_h.png
|
./tile/dirt.png
|
||||||
./text/char_u_c.png
|
./tile/lantern.png
|
||||||
./text/char_l_g.png
|
./tile/hemp8.png
|
||||||
./text/char_l_s.png
|
./tile/wall.png
|
||||||
./text/char_fullstop.png
|
./tile/cactus_top.png
|
||||||
./text/char_u_j.png
|
./tile/cactus2.png
|
||||||
./text/char_l_m.png
|
./tile/rock.png
|
||||||
./text/char_l_t.png
|
./tile/water.png
|
||||||
./text/char_u_v.png
|
./tile/hemp4.png
|
||||||
./text/char_colon.png
|
./tile/stone.png
|
||||||
./text/char_l_i.png
|
./tile/tree_leaves.png
|
||||||
./text/char_l_y.png
|
./tile/sapling2.png
|
||||||
./text/char_semicolon.png
|
./tile/ladder_up.png
|
||||||
./text/char_u_l.png
|
./tile/sapling3.png
|
||||||
./text/char_apostrophe.png
|
./tile/lava_flow.png
|
||||||
./text/char_u_e.png
|
./tile/ice_wall.png
|
||||||
./text/char_5.png
|
./tile/grass.png
|
||||||
./text/char_2.png
|
./tile/chest.png
|
||||||
./text/char_3.png
|
./tile/sapling4.png
|
||||||
./text/char_l_p.png
|
./tile/lava.png
|
||||||
./text/char_and.png
|
./tile/tall_grass.png
|
||||||
./text/char_fslash.png
|
./tile/hemp5.png
|
||||||
./text/char_l_u.png
|
./tile/sapling1.png
|
||||||
./text/char_u_f.png
|
./tile/snow.png
|
||||||
./text/char_u_u.png
|
./tile/sandstone_wall.png
|
||||||
./text/char_at.png
|
./tile/rock_sandstone.png
|
||||||
./text/char_l_e.png
|
./tile/hemp6.png
|
||||||
./text/char_l_l.png
|
./tile/cactus1.png
|
||||||
./text/char_u_g.png
|
./tile/campfire.png
|
||||||
./text/char_u_q.png
|
./tile/tree_branch_leaves.png
|
||||||
./text/char_u_b.png
|
./tile/tunnel_down.png
|
||||||
./text/char_l_o.png
|
./tile/tree_branch_leaves_snow.png
|
||||||
./text/char_csbracket.png
|
./tile/tree_leaves_snow.png
|
||||||
./text/char_osbracket.png
|
./tile/rock_ice.png
|
||||||
./text/char_minus.png
|
./tile/boss_portal.png
|
||||||
./text/char_l_v.png
|
./tile/ladder.png
|
||||||
./text/char_lthan.png
|
./tile/hemp7.png
|
||||||
./text/char_u_s.png
|
./tile/grass_infested.png
|
||||||
./text/char_equals.png
|
./tile/tree_branch.png
|
||||||
./text/char_8.png
|
./tile/sand.png
|
||||||
./text/char_ccbracket.png
|
./tile/tree_base.png
|
||||||
./text/char_underscore.png
|
./tile/cactus3.png
|
||||||
./text/char_u_x.png
|
./tile/sandstone.png
|
||||||
./text/char_0.png
|
./tile/hemp3.png
|
||||||
./text/char_l_d.png
|
./tile/hemp2.png
|
||||||
./text/char_l_c.png
|
./tile/ice.png
|
||||||
./text/char_l_j.png
|
|
||||||
./text/char_u_z.png
|
|
||||||
./text/char_u_h.png
|
|
||||||
./text/char_pow.png
|
|
||||||
./text/char_hashtag.png
|
|
||||||
./text/char_gthan.png
|
|
||||||
./text/char_cbracket.png
|
|
||||||
./text/char_u_i.png
|
|
||||||
./text/char_question.png
|
|
||||||
./text/char_u_o.png
|
|
||||||
./text/char_u_y.png
|
|
||||||
./text/char_l_r.png
|
|
||||||
./text/char_l_b.png
|
|
||||||
./text/char_ocbracket.png
|
|
||||||
./text/char_l_a.png
|
|
||||||
./text/char_quotation.png
|
|
||||||
./text/char_l_n.png
|
|
||||||
./text/char_u_p.png
|
|
||||||
./text/char_tilde.png
|
|
||||||
./text/char_u_r.png
|
|
||||||
./text/char_4.png
|
|
||||||
./entity/armored_zombie_back_moving.png
|
|
||||||
./entity/zombie_front_still.png
|
|
||||||
./entity/tnt.png
|
|
||||||
./entity/flare.png
|
./entity/flare.png
|
||||||
./entity/boss1/boss_walking.png
|
./entity/grappling_hook.png
|
||||||
|
./entity/zombie_back_moving.png
|
||||||
|
./entity/tnt.png
|
||||||
|
./entity/armored_zombie_back_moving.png
|
||||||
|
./entity/armored_zombie_front_moving.png
|
||||||
|
./entity/player/hair_side.png
|
||||||
|
./entity/player/head_top.png
|
||||||
|
./entity/player/head_side.png
|
||||||
|
./entity/player/head_back.png
|
||||||
|
./entity/player/head_bottom.png
|
||||||
|
./entity/player/hair_front.png
|
||||||
|
./entity/player/head_front.png
|
||||||
|
./entity/player/hair_back.png
|
||||||
|
./entity/player/hair_top.png
|
||||||
|
./entity/dummy.png
|
||||||
|
./entity/armored_zombie_front_still.png
|
||||||
|
./entity/armored_zombie_back_still.png
|
||||||
|
./entity/zombie_front_moving.png
|
||||||
|
./entity/boss1/boss_walking_firing.png
|
||||||
./entity/boss1/boss_firing.png
|
./entity/boss1/boss_firing.png
|
||||||
./entity/boss1/boss_still.png
|
./entity/boss1/boss_still.png
|
||||||
./entity/boss1/boss_walking_firing.png
|
./entity/boss1/boss_walking.png
|
||||||
./entity/armored_zombie_back_still.png
|
|
||||||
./entity/armored_zombie_front_moving.png
|
|
||||||
./entity/player/head_back.png
|
|
||||||
./entity/player/hair_top.png
|
|
||||||
./entity/player/head_front.png
|
|
||||||
./entity/player/head_top.png
|
|
||||||
./entity/player/hair_side.png
|
|
||||||
./entity/player/head_side.png
|
|
||||||
./entity/player/hair_back.png
|
|
||||||
./entity/player/hair_front.png
|
|
||||||
./entity/player/head_bottom.png
|
|
||||||
./entity/grappling_hook.png
|
|
||||||
./entity/zombie_back_still.png
|
./entity/zombie_back_still.png
|
||||||
./entity/dummy.png
|
./entity/zombie_front_still.png
|
||||||
./entity/zombie_back_moving.png
|
./item/acorn.png
|
||||||
./entity/armored_zombie_front_still.png
|
./item/grappling_hook.png
|
||||||
./entity/zombie_front_moving.png
|
./item/gun_upgrade.png
|
||||||
./particle/smoke_1.png
|
./item/shield_upgrade.png
|
||||||
./particle/water.png
|
./item/rock.png
|
||||||
./particle/rain.png
|
./item/flint_hatchet.png
|
||||||
./particle/blood.png
|
./item/log.png
|
||||||
./particle/snow.png
|
./item/log_snow.png
|
||||||
./particle/smoke_3.png
|
./item/hemp_seed.png
|
||||||
./particle/smoke_4.png
|
./item/ammo_box.png
|
||||||
./particle/smoke_2.png
|
./item/plant_fibre.png
|
||||||
./particle/smoke_0.png
|
./item/health_potion.png
|
||||||
./particle/bullet.png
|
./item/snow_pile.png
|
||||||
./particle/lava.png
|
./item/flint.png
|
||||||
./particle/smoke_trail.png
|
./item/sandstone.png
|
||||||
./particle/smoke_5.png
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 774 B |
Loading…
Reference in New Issue