Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
MelvinShwuaner authored Jun 17, 2022
1 parent 393066c commit 6df7912
Show file tree
Hide file tree
Showing 30 changed files with 515 additions and 296 deletions.
11 changes: 5 additions & 6 deletions src/net/questfor/thepersonwhoasked/GlobalProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ public void setObjectRenderer() {
GlobalGameThreadConfigs.obj[mapID][i].worldy = gp.tilesize * 121;
GlobalGameThreadConfigs.obj[mapID][i].set();
i++;
GlobalGameThreadConfigs.obj[mapID][i] = new chest(gp);
GlobalGameThreadConfigs.obj[mapID][i].worldx = gp.tilesize * 121;
GlobalGameThreadConfigs.obj[mapID][i].worldy = gp.tilesize * 123;
GlobalGameThreadConfigs.obj[mapID][i] = new chest(gp, 121, 123, 4);

GlobalGameThreadConfigs.obj[mapID][i].inventory.add(new OBJ_BRICK_WALL(gp));
GlobalGameThreadConfigs.obj[mapID][i].inventory.add(new OBJ_BRICK_WALL(gp));
GlobalGameThreadConfigs.obj[mapID][i].inventory.add(new OBJ_BRICK_WALL(gp));
Expand All @@ -63,10 +62,10 @@ public void setObjectRenderer() {
GlobalGameThreadConfigs.obj[mapID][i] = new OBJ_POTION_HEALTH_1(gp);
GlobalGameThreadConfigs.obj[mapID][i].worldx = gp.tilesize * 120;
GlobalGameThreadConfigs.obj[mapID][i].worldy = gp.tilesize * 123;
GlobalGameThreadConfigs.obj[mapID][i] = new furnace(gp, 121, 124);
GlobalGameThreadConfigs.obj[mapID][i] = new furnace(gp, 121, 124, 4);
i = 0;
mapID = 1;
GlobalGameThreadConfigs.obj[mapID][i] = new chest(gp);
GlobalGameThreadConfigs.obj[mapID][i] = new chest(gp, 111, 108, 4);
GlobalGameThreadConfigs.obj[mapID][i].worldx = gp.tilesize * 111;
GlobalGameThreadConfigs.obj[mapID][i].worldy = gp.tilesize * 108;
GlobalGameThreadConfigs.obj[mapID][i].inventory.add(new OBJkey(gp));
Expand Down Expand Up @@ -149,7 +148,7 @@ public void SetRecipes(){
GlobalGameThreadConfigs.Recipes[1].Recipe[0] = new OBJkey(gp);
GlobalGameThreadConfigs.Recipes[1].Recipe[1] = new OBJ_BRICK_WALL(gp);
GlobalGameThreadConfigs.Recipes[1].Type = 1;
GlobalGameThreadConfigs.Recipes[1].Result = new furnace(gp, 0, 0);
GlobalGameThreadConfigs.Recipes[1].Result = new furnace(gp, 0, 0, 0);
}

public void setScreenRenderer() {
Expand Down
25 changes: 1 addition & 24 deletions src/net/questfor/thepersonwhoasked/Maingam/UI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1477,30 +1477,7 @@ public static void selectItem() {
}
}
public static LivingEntity createnewobject(LivingEntity old){
LivingEntity newentity = new LivingEntity(gp);
switch (old.name){
case "chest" -> newentity = new chest(gp);
case "furnace" -> newentity = new furnace(gp, 0, 0);
case "BRIC WALL" -> newentity = new OBJ_BRICK_WALL(gp);
case "Bronze coin" -> newentity = new OBJ_COIN_BRONZE(gp);
case "WoodCutter's axe"-> newentity = new OBJ_IRON_AXE(gp);
case "Iron shovel"-> newentity = new OBJ_IRON_SHOVEL(gp);
case "Iron sword"-> newentity = new OBJ_IRON_SWORD(gp);
case "Mana Crystal"-> newentity = new OBJ_MANA_CRYSTAL(gp);
case "Red Potion" -> newentity = new OBJ_POTION_HEALTH_1(gp);
case "Diamond Shield"-> newentity = new OBJ_SHIELD_DIAMOND(gp);
case "Wooden Shield" -> newentity = new OBJ_SHIELD_WOOD(gp);
case "boots" -> newentity = new OBJboots(gp);
case "door" -> newentity = new OBJdoor(gp, 0, 0);
case "door open" -> newentity = new OBJdooropen(gp, 0, 0);
case "heart"-> newentity = new OBJHeart(gp);
case "key"-> newentity = new OBJkey(gp);
case "crafting table" -> newentity = new crafting_table(gp, 0, 0);
case "Brick" -> newentity = new Brick(gp);
case "Clay" -> newentity = new Clay(gp);
case "Basic Coal" -> newentity = new OBJ_coal(gp);
case "Iron pickaxe" -> newentity = new OBJ_IRON_PICKAXE(gp);
}
LivingEntity newentity = old.replicate();
newentity.inventory = old.inventory;
return newentity;
}
Expand Down
18 changes: 5 additions & 13 deletions src/net/questfor/thepersonwhoasked/Maingam/hitboxregister.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,13 @@ public int worldzobjectreturn(LivingEntity entity, LivingEntity[][] target) {
target[MainGame.currentmap][i].hitbox.x = (int) (target[MainGame.currentmap][i].worldx + target[MainGame.currentmap][i].hitbox.x);
target[MainGame.currentmap][i].hitbox.y = (int) (target[MainGame.currentmap][i].worldy + target[MainGame.currentmap][i].hitbox.y);
switch (entity.direction) {
case "up":
entity.hitbox.y -= entity.speed;
break;
case "down":
entity.hitbox.y += entity.speed;
break;
case "left":
entity.hitbox.x -= entity.speed;
break;
case "right":
entity.hitbox.x += entity.speed;
break;
case "up" -> entity.hitbox.y -= entity.speed;
case "down" -> entity.hitbox.y += entity.speed;
case "left" -> entity.hitbox.x -= entity.speed;
case "right" -> entity.hitbox.x += entity.speed;
}
if (entity.hitbox.intersects(target[MainGame.currentmap][i].hitbox)) {
if (entity.worldz == target[MainGame.currentmap][i].worldz || entity.worldz == target[MainGame.currentmap][i].worldz+1) {
if (entity.worldz == target[MainGame.currentmap][i].worldz) {
if (target[MainGame.currentmap][i] != entity) {
index = i;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ public void DestroyOBJ(int tileentityI) {
public boolean ItemRequirements(LivingEntity SourceEntity){return false;}
public void playSE(){}
public LivingEntity getDestroyedForm(){return null;}
public void open(){}
public void open(int x, int y, int z, int i){}
public void searchPath(double taskX, double taskY){
if(path == null){
path = new Path();
Expand Down Expand Up @@ -905,4 +905,6 @@ public void damageprojectile(int i) {

}
}
public LivingEntity replicate(){return null;}
public void Place(double x, double y, double z, int i){}
}
Loading

0 comments on commit 6df7912

Please sign in to comment.