chore: Minor changes

This commit is contained in:
Jakub Žitník 2025-03-25 08:22:09 +01:00
parent b6c0e730d3
commit 2ecca0fa52
Signed by: jzitnik
GPG Key ID: C577A802A6AF4EF3
6 changed files with 89 additions and 89 deletions

5
.gitignore vendored
View File

@ -35,4 +35,7 @@ build/
.vscode/
### Mac OS ###
.DS_Store
.DS_Store
logs
world.ser

View File

@ -1,7 +1,6 @@
package cz.jzitnik.game.generation;
import cz.jzitnik.game.entities.Block;
import cz.jzitnik.game.entities.items.ItemBlockSupplier;
import cz.jzitnik.game.Game;
import cz.jzitnik.game.SpriteLoader;
import cz.jzitnik.game.sprites.Steve;
@ -33,10 +32,6 @@ public class Generation {
// Spawn player at a valid starting point
world[terrainHeight[256] - 1][256].add(steveBlock2);
world[terrainHeight[256] - 2][256].add(steveBlock);
game.getInventory().addItem(ItemBlockSupplier.getItem("lava_bucket"));
game.getInventory().addItem(ItemBlockSupplier.getItem("crafting_table"));
game.getInventory().addItem(ItemBlockSupplier.getItem("oak_planks"));
}
private static void initializeWorld(List<Block>[][] world) {

View File

@ -50,11 +50,16 @@ public class ThreadProvider {
for (int i = 0; i < paramTypes.length; i++) {
Class<?> type = paramTypes[i];
if (type == Game.class) params[i] = game;
else if (type == ScreenRenderer.class) params[i] = screenRenderer;
else if (type == Terminal.class) params[i] = terminal;
else if (type == boolean[].class) params[i] = isRunning;
else if (type == Player.class) params[i] = game.getPlayer();
if (type == Game.class)
params[i] = game;
else if (type == ScreenRenderer.class)
params[i] = screenRenderer;
else if (type == Terminal.class)
params[i] = terminal;
else if (type == boolean[].class)
params[i] = isRunning;
else if (type == Player.class)
params[i] = game.getPlayer();
else {
suitable = false;
break;

View File

@ -1,26 +1,25 @@
                                                  
                      ▓▓▒▒▓▓▓                     
                  ░ ░░ ▒▒ ▒▒ ░  ░                 
              ░░▒▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▒░░░             
           ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒▒▒▒▒░▒▒▒▒▒░░          
      ▓▓▒  ▒▒▒▒░░░░░▒▒▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒  ▓▓▓     
   ▓▓  ▒▒▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓▓  
   ▓▓▒▒▒▒  ░▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒   ▒▒▒▒▓▓  
   ▓▓▒▒▒▒▒ ░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░   ▒▒▒▒▒▓▓  
   ▓▓▒▒▒▒▒▒     ░░░▒░░▒▒▒▒▒▒▒░░░░░     ▒▒▒▒▒░░▓▓  
   ▓▓▒▒▒▒▒▒▒▒     ▒▒▒ ▓▒▒▒▒▓▓ ▒▒      ▒▒░░░░▒▒▓▓  
   ▓▓▒▒ ▒▒▒▒▒▓  ▒▒▒▒▒▒▒▒▓ ▓▒▒▒▒▒▒▒▒ ▓▓░░▒▒▒▒▒▒▓▓  
   ▓▓▒▒  ▒▒▒▒  ▓▒▒▒▒▒▒▒▒▓▓▓▒▒▒▒▒░░░▓  ▒▒▒▒▒▒▒▒▓▓  
   ▓▓▒▒  ▒▒▒▒   ▒▒    ▒▒▓▓▓▒░░▒▒▒▒▒   ▒▒▒▒░░▒░▓▓  
   ▓▓▒▒  ▒▒▒▒   ▒▒  ▒  ▒▓▓▓░▒▒▒▒  ▒   ░░░░▒▒▒▒▓▓  
   ▓▓▒▓▓▓▓▒▒▒▓▓▓▒▒▓▓   ▒▓▓▓▒▒▒ ▒  ░▓▓▓▒▒▒▒▒▒▒▒▓▓  
   ▓▓▒▒▓▓▓▒▒▒   ▒▒▓▓▓▓▓▒▓▓▓▒▒▒░▓░░▒   ▒▒▒▒▒▒░░▓▓  
   ▓▓▒▒▒▒▒▒▒▒   ▒▒▓▓▓▓▓▒▓▓▓░░░▓▒▓▓▒   ▒▒▒░░▒▒▒▓▓  
   ▓▓▒▒▒▒▒▒▒▒▓▓ ▒▒▒▒▓▓▓▒▓▓▓▒▒▒▓▒▒▒▒ ▓▓░▒▒▒▒▒▒▒▓▓  
   ▓▓▒▒▒▒▒▒▒▒   ▒▒▒▒▓▓▓▒▓▓▓▒▒▒▒▒░░░   ▒▒▒▒▒▒▒░▓▓  
      ▒▒▒▒▒▒▒   ▒▒▒▒▒▓▓▒▓▓▓▒░░▒▒▒▒▒   ▒▒▒░░░░     
          ▒▒▒   ▒▒▒▒▒▓▓▒▓▓▓▒▒▒▒▒▒▒▒  ▓░░░         
              ▓▓▒▒▒▒▒▒▒▒▓▓▓▒▒▒▒▒▒░▒▓▓             
                  ▒▒▒▒▒▒▓▓▓▒▒░░░░                 
                      ▒▒▓▓▓░░                     

                                                 
                                             
                                         
                                   
                              
                           
                          
                         
                        
                         
                           
                      
                          
                         
                           
                        
                         
                         
                           
                             
                                
                                     
                                         
                                             
                                                 

View File

@ -1,26 +1,25 @@
                                                  
                      ▒▒▒▒▒▒▒                     
                  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒                 
              ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒             
          ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒         
      ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒     
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒▒▒░░  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒░░▒░▒▒  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒▒  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒▒▒  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒░░▒▒▒▒▒▒▒▒▒▒░░░▒  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒▒▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▒▒▒▒  
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▒▒▒▒▒░░░  
      ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒░░░░     
          ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒░░░         
              ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒▒▒             
                  ▒▒▒▒▒▒▒▒▒▒▒░░░░                 
                      ▒▒▒░░░░                     

                                                 
                                             
                                         
                                     
                                 
                             
                           
                          
                         
                        
                        
                      
                      
                          
                          
                          
                        
                         
                           
                            
                                 
                                   
                                        
                                             
                                                 

View File

@ -1,26 +1,25 @@
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒