Skip to content

Commit

Permalink
1.17 works
Browse files Browse the repository at this point in the history
  • Loading branch information
Pdiddy973 committed Aug 22, 2021
1 parent f2404f6 commit 6c63607
Show file tree
Hide file tree
Showing 854 changed files with 11,047 additions and 1,454 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.Pdiddy973.AllTheCompressed.blocks.minecraft;


import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;

public class Glass extends Block {
public Glass() {
super(Properties.of(Material.STONE)
.sound(SoundType.STONE)
.strength(30f, 15F)
.requiresCorrectToolForDrops());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.Pdiddy973.AllTheCompressed.blocks.minecraft;


import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;

public class Glowstone extends Block {
public Glowstone() {
super(Properties.of(Material.GLASS)
.sound(SoundType.GLASS)
.strength(30f, 15F)
.lightLevel((b) -> 15)
.requiresCorrectToolForDrops());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@ private void clientSetup(FMLClientSetupEvent event) {

private void registerBlocks(RegistryEvent.Register<Block> event) {
for (AllTheCompressedType type : AllTheCompressedType.VALUES) {
Block[] compressedList = new Block[9];
BLOCKS.put(type.name, compressedList);
for (int i = 0; i < 9; i++) {
Block block = type.getBlock();
Block block = type.factory.get();
event.getRegistry().register(block.setRegistryName(type.name + "_block_" + (i + 1) + "x"));
compressedList[i] = block;
type.blocks.add(block);
}
}
Expand Down
212 changes: 61 additions & 151 deletions src/main/java/com/Pdiddy973/allthecompressed/AllTheCompressedType.java
Original file line number Diff line number Diff line change
@@ -1,168 +1,78 @@
package com.Pdiddy973.AllTheCompressed;

import net.minecraft.resources.ResourceLocation;
import com.Pdiddy973.AllTheCompressed.blocks.atm.*;
import com.Pdiddy973.AllTheCompressed.blocks.ato.*;
import com.Pdiddy973.AllTheCompressed.blocks.minecraft.*;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.NetherrackBlock;
import net.minecraft.world.level.block.PoweredBlock;
import net.minecraft.world.level.block.SoulSandBlock;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraftforge.registries.ForgeRegistries;

import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
import java.util.function.Supplier;

public enum AllTheCompressedType {
//ATM
ALLTHEMODIUM("allthemodium", Allthemodium::new),
VIBRANIUM("vibranium", Vibranium::new),
UNOBTAINIUM("unobtainium", Unobtainium::new),
VA_ALLOY("va_alloy", va_alloy::new),
UA_ALLOY("ua_alloy", ua_alloy::new),
UV_ALLOY("uv_alloy", uv_alloy::new),

//ATO
ALUMINUM("aluminum", Aluminum::new),
BRONZE("bronze", Bronze::new),
CONSTANTAN("constantan", Constantan::new),
ELECTRUM("electrum", Electrum::new),
ENDERIUM("enderium", Enderium::new),
INVAR("invar", Invar::new),
LEAD("lead", Lead::new),
LUMIUM("lumium", Lumium::new),
NICKEL("nickel", Nickel::new),
OSMIUM("osmium", Osmium::new),
PLATINUM("platinum", Platinum::new),
SIGNALUM("signalum", Signalum::new),
SILVER("silver", Silver::new),
STEEL("steel", Steel::new),
TIN("tin", Tin::new),
URANIUM("uranium", Uranium::new),
ZINC("zinc", Zinc::new),

//Minecraft
CLAY("clay",//
new ResourceLocation("minecraft", "clay"),
new ResourceLocation("minecraft", "block/clay"),
new ResourceLocation("minecraft", "block/clay"),
Block::new),
COAL("coal",//
new ResourceLocation("minecraft", "coal_block"),
new ResourceLocation("minecraft", "block/coal_block"),
new ResourceLocation("minecraft", "block/coal_block"),
Block::new),
COBBLESTONE("cobblestone",//
new ResourceLocation("minecraft", "cobblestone"),
new ResourceLocation("minecraft", "block/cobblestone"),
new ResourceLocation("minecraft", "block/cobblestone"),
Block::new),
COPPER("copper",//
new ResourceLocation("minecraft", "copper"),
new ResourceLocation("minecraft", "block/copper_block"),
new ResourceLocation("minecraft", "block/copper_block"),
Block::new),
DIAMOND("diamond",//
new ResourceLocation("minecraft", "diamond_block"),
new ResourceLocation("minecraft", "block/diamond_block"),
new ResourceLocation("minecraft", "block/diamond_block"),
Block::new),
DIRT("dirt",//
new ResourceLocation("minecraft", "dirt"),
new ResourceLocation("minecraft", "block/dirt"),
new ResourceLocation("minecraft", "block/dirt"),
Block::new),
EMERALD("emerald",//
new ResourceLocation("minecraft", "emerald_block"),
new ResourceLocation("minecraft", "block/emerald_block"),
new ResourceLocation("minecraft", "block/emerald_block"),
Block::new),
END_STONE("end_stone",//
new ResourceLocation("minecraft", "end_stone"),
new ResourceLocation("minecraft", "block/end_stone"),
new ResourceLocation("minecraft", "block/end_stone"),
Block::new),
GOLD("gold",//
new ResourceLocation("minecraft", "gold_block"),
new ResourceLocation("minecraft", "block/gold_block"),
new ResourceLocation("minecraft", "block/gold_block"),
Block::new),
GRAVEL("gravel",//
new ResourceLocation("minecraft", "gravel"),
new ResourceLocation("minecraft", "block/gravel"),
new ResourceLocation("minecraft", "block/gravel"),
FallingDamageBlock::new),
IRON("iron",//
new ResourceLocation("minecraft", "iron_block"),
new ResourceLocation("minecraft", "block/iron_block"),
new ResourceLocation("minecraft", "block/iron_block"),
Block::new),
//LAPIS("lapis",
//new ResourceLocation("minecraft", "lapis_block"),
//new ResourceLocation("minecraft", "block/lapis_block"),
//new ResourceLocation("minecraft", "block/lapis_block"),
// Block::new),
NETHERITE("netherite",//
new ResourceLocation("minecraft", "netherite_block"),
new ResourceLocation("minecraft", "block/netherite_block"),
new ResourceLocation("minecraft", "block/netherite_block"),
Block::new),
NETHERRACK("netherrack",//
new ResourceLocation("minecraft", "netherrack"),
new ResourceLocation("minecraft", "block/netherrack"),
new ResourceLocation("minecraft", "block/netherrack"),
NetherrackBlock::new),
OBSIDIAN("obsidian",//
new ResourceLocation("minecraft", "obsidian"),
new ResourceLocation("minecraft", "block/obsidian"),
new ResourceLocation("minecraft", "block/obsidian"),
Block::new),
QUARTZ("quartz",//
new ResourceLocation("minecraft", "quartz_block"),
new ResourceLocation("minecraft", "block/quartz_block_side"),
new ResourceLocation("minecraft", "block/quartz_block"),
Block::new),
RED_SAND("red_sand",//
new ResourceLocation("minecraft", "red_sand"),
new ResourceLocation("minecraft", "block/red_sand"),
new ResourceLocation("minecraft", "block/red_sand"),
FallingDamageBlock::new),
REDSTONE("redstone",//
new ResourceLocation("minecraft", "redstone_block"),
new ResourceLocation("minecraft", "block/redstone_block"),
new ResourceLocation("minecraft", "block/redstone_block"),
PoweredBlock::new),
SAND("sand",//
new ResourceLocation("minecraft", "sand"),
new ResourceLocation("minecraft", "block/sand"),
new ResourceLocation("minecraft", "block/sand"),
FallingDamageBlock::new),
SNOW("snow",//
new ResourceLocation("minecraft", "snow"),
new ResourceLocation("minecraft", "block/snow"),
new ResourceLocation("minecraft", "block/snow_block"),
Block::new),
SOUL_SAND("soul_sand",//
new ResourceLocation("minecraft", "soul_sand"),
new ResourceLocation("minecraft", "block/soul_sand"),
new ResourceLocation("minecraft", "block/soul_sand"),
SoulSandBlock::new),
STONE("stone",//
new ResourceLocation("minecraft", "stone"),
new ResourceLocation("minecraft", "block/stone"),
new ResourceLocation("minecraft", "block/stone"),
Block::new),
CLAY("clay", Clay::new),
COAL("coal", Coal::new),
COBBLESTONE("cobblestone", Cobblestone::new),
COPPER("copper", Copper::new),
DIAMOND("diamond", Diamond::new),
DIRT("dirt", Dirt::new),
EMERALD("emerald", Emerald::new),
END_STONE("end_stone", End_Stone::new),
GLASS("glass", Glass::new),
GLOWSTONE("glowstone", Glowstone::new),
GOLD("gold", Gold::new),
GRAVEL("gravel", Gravel::new),
HONEY("honey", Honey::new),
IRON("iron", Iron::new),
NETHERITE("netherite", Netherite::new),
NETHERRACK("netherrack", Netherrack::new),
OBSIDIAN("obsidian", Obsidian::new),
QUARTZ("quartz", Quartz::new),
RED_SAND("red_sand", Red_Sand::new),
REDSTONE("redstone", Redstone::new),
SAND("sand", Sand::new),
SNOW("snow", Snow::new),
SOUL_SAND("soul_sand", Soul_Sand::new),
STONE("stone", Stone::new);

//Allthemodium
ALLTHEMODIUM("allthemodium",
new ResourceLocation("allthemodium", "allthemodium_block"),
new ResourceLocation("allthemodium", "block/allthemodium_block"),
new ResourceLocation("allthemodium", "block/allthemodium_block"),
Block::new),
//AllTheOres
ALUMINUM("aluminum",
new ResourceLocation("alltheores", "aluminum_block"),
new ResourceLocation("alltheores", "block/aluminum_block"),
new ResourceLocation("alltheores", "block/aluminum_block"),
Block::new);

public static final AllTheCompressedType[] VALUES = values();

public final String name;
public final ResourceLocation baseResourceLocation;
public final Supplier<Block> factory;
public final List<Block> blocks;
public final ResourceLocation particlePath;
public final ResourceLocation baseBlockModel;
private final Function<BlockBehaviour.Properties, Block> constructor;

AllTheCompressedType(String n, ResourceLocation baseResourceLocation,
ResourceLocation particlePath, ResourceLocation baseBlockModel,
Function<BlockBehaviour.Properties, Block> constructor) {
this.name = n;
this.blocks = new ArrayList<>();
this.particlePath = particlePath;
this.baseBlockModel = baseBlockModel;
this.baseResourceLocation = baseResourceLocation;
this.constructor = constructor;
}

public Block getBaseBlock() {
return ForgeRegistries.BLOCKS.getValue(baseResourceLocation);
}

public Block getBlock() {
return constructor.apply(BlockBehaviour.Properties.copy(ForgeRegistries.BLOCKS.getValue(baseResourceLocation)));
AllTheCompressedType(String n, Supplier<Block> f) {
name = n;
factory = f;
blocks = new ArrayList<>();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.Pdiddy973.AllTheCompressed.blocks.atm;

import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;

public class Allthemodium extends Block {
public Allthemodium() {
super(Properties.of(Material.METAL)
.sound(SoundType.METAL)
.strength(15f, 30F)
.requiresCorrectToolForDrops());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.Pdiddy973.AllTheCompressed.blocks.atm;


import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;

public class Unobtainium extends Block {
public Unobtainium() {
super(Properties.of(Material.METAL)
.sound(SoundType.METAL)
.strength(15f, 30F)
.requiresCorrectToolForDrops());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.Pdiddy973.AllTheCompressed.blocks.atm;


import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;

public class Vibranium extends Block {
public Vibranium() {
super(Properties.of(Material.METAL)
.sound(SoundType.METAL)
.strength(15f, 30F)
.requiresCorrectToolForDrops());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.Pdiddy973.AllTheCompressed.blocks.atm;

import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;

public class ua_alloy extends Block {
public ua_alloy() {
super(Properties.of(Material.METAL)
.sound(SoundType.METAL)
.strength(15f, 30F)
.requiresCorrectToolForDrops());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.Pdiddy973.AllTheCompressed.blocks.atm;


import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;

public class uv_alloy extends Block {
public uv_alloy() {
super(Properties.of(Material.METAL)
.sound(SoundType.METAL)
.strength(15f, 30F)
.requiresCorrectToolForDrops());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.Pdiddy973.AllTheCompressed.blocks.atm;


import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;

public class va_alloy extends Block {
public va_alloy() {
super(Properties.of(Material.METAL)
.sound(SoundType.METAL)
.strength(15f, 30F)
.requiresCorrectToolForDrops());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.Pdiddy973.AllTheCompressed.blocks.ato;


import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;

public class Aluminum extends Block {
public Aluminum() {
super(Properties.of(Material.METAL)
.sound(SoundType.METAL)
.strength(15f, 30F)
.requiresCorrectToolForDrops());
}
}
Loading

0 comments on commit 6c63607

Please sign in to comment.