Kajetan Johannes Hammerle 3 years ago
parent
commit
a76904f123

+ 0 - 34
src/main/java/me/km/snuviscript/commands/BlockCommands.java

@@ -24,7 +24,6 @@ import net.minecraft.util.ResourceLocation;
 import net.minecraft.util.math.BlockPos;
 import net.minecraft.util.text.StringTextComponent;
 import net.minecraft.world.IWorld;
-import net.minecraft.world.World;
 
 public class BlockCommands {
 
@@ -241,39 +240,6 @@ public class BlockCommands {
             stack.setCount(InventoryUtils.removeFromInventory((ChestTileEntity) te, stack));
             return stack;
         });
-        sm.registerConsumer("block.grow", (sc, in) -> {
-            Location l1 = (Location) in[0].get(sc);
-            World w = l1.getWorld().getWorld();
-            BlockPos pos1 = l1.getBlockPos();
-            BlockPos pos2 = ((Location) in[1].get(sc)).getBlockPos();
-
-            int x = Math.min(pos1.getX(), pos2.getX());
-            int endX = Math.max(pos1.getX(), pos2.getX());
-
-            int y = Math.min(pos1.getY(), pos2.getY());
-            int endY = Math.max(pos1.getY(), pos2.getY());
-
-            int z = Math.min(pos1.getZ(), pos2.getZ());
-            int endZ = Math.max(pos1.getZ(), pos2.getZ());
-
-            if(endX - x > 50 || endY - y > 50 || endZ - z > 50) {
-                throw new IllegalArgumentException("uhh, that area seems way to big for growing plants");
-            }
-
-            BlockPos relative;
-            BlockState state;
-            for(; x <= endX; x++) {
-                for(; y <= endY; y++) {
-                    for(; z <= endZ; z++) {
-                        relative = new BlockPos(x, y, z);
-                        state = w.getBlockState(relative);
-                        if(state.getBlock() instanceof CropsBlock) {
-                            w.setBlockState(relative, state.with(CropsBlock.AGE, 7));
-                        }
-                    }
-                }
-            }
-        });
         sm.registerConsumer("block.setspawnertype", (sc, in) -> {
             Location l = (Location) in[0].get(sc);
             MobSpawnerTileEntity spawner = (MobSpawnerTileEntity) l.getWorld().getTileEntity(l.getBlockPos());

+ 0 - 2
src/main/java/me/km/utils/Mapper.java

@@ -3,7 +3,6 @@ package me.km.utils;
 import net.minecraft.block.Block;
 import net.minecraft.enchantment.Enchantment;
 import net.minecraft.item.Item;
-import net.minecraft.particles.IParticleData;
 import net.minecraft.particles.ParticleType;
 import net.minecraft.potion.Effect;
 import net.minecraft.state.IProperty;
@@ -11,7 +10,6 @@ import net.minecraft.state.properties.BlockStateProperties;
 import net.minecraft.util.ResourceLocation;
 import net.minecraft.util.SoundCategory;
 import net.minecraft.util.SoundEvent;
-import net.minecraft.world.GameRules;
 import net.minecraftforge.registries.ForgeRegistries;
 
 public class Mapper {

+ 0 - 1
src/main/java/me/km/utils/ReflectionUtils.java

@@ -12,7 +12,6 @@ import net.minecraft.command.Commands;
 import net.minecraft.entity.Entity;
 import net.minecraft.entity.ai.goal.GoalSelector;
 import net.minecraft.entity.ai.goal.PrioritizedGoal;
-import net.minecraft.entity.item.ItemEntity;
 import net.minecraft.entity.player.PlayerAbilities;
 import net.minecraft.entity.player.ServerPlayerEntity;
 import net.minecraft.server.MinecraftServer;