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

3
.gitignore vendored
View File

@ -36,3 +36,6 @@ build/
### Mac OS ### ### Mac OS ###
.DS_Store .DS_Store
logs
world.ser

View File

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

View File

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

View File

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


View File

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


View File

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