diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index 59d8f95..ae013c4 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -29,7 +29,12 @@
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 21f112f..f6589e3 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -4,7 +4,7 @@
-
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index f834406..c2a5ca1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,5 @@
plugins {
- id 'fabric-loom' version '0.10-SNAPSHOT'
+ id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
}
@@ -22,6 +22,10 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
}
+loom {
+ accessWidenerPath = file("src/main/resources/vplus.accesswidener")
+}
+
processResources {
inputs.property "version", project.version
@@ -43,4 +47,5 @@ jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
-}
\ No newline at end of file
+}
+
diff --git a/gradle.properties b/gradle.properties
index e5c7bdb..b24832c 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx4G
# Fabric Properties
# check these on https://fabricmc.net/versions.html
-minecraft_version=1.18.1
-yarn_mappings=1.18.1+build.1
-loader_version=0.12.12
+minecraft_version=1.19
+yarn_mappings=1.19+build.1
+loader_version=0.14.6
# Mod Properties
-mod_version = 1.1.1
+mod_version = 1.1.2
maven_group = tech.nevets
archives_base_name = vplus
# Dependencies
-fabric_version=0.44.0+1.18
\ No newline at end of file
+fabric_version=0.55.1+1.19
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index d2880ba..aa991fc 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/src/main/java/tech/nevets/vplus/Main.java b/src/main/java/tech/nevets/vplus/Main.java
index cee7ee5..358fc1e 100644
--- a/src/main/java/tech/nevets/vplus/Main.java
+++ b/src/main/java/tech/nevets/vplus/Main.java
@@ -6,9 +6,8 @@ import tech.nevets.vplus.blocks.VPBlocks;
import tech.nevets.vplus.food.VPFood;
import tech.nevets.vplus.items.VPItems;
import tech.nevets.vplus.misc.VPFuels;
-import tech.nevets.vplus.misc.VPOreGen;
-import tech.nevets.vplus.misc.VPZoom;
import tech.nevets.vplus.tools.VPTools;
+import tech.nevets.vplus.worldgen.features.VPOreConfiguredFeatures;
public class Main implements ModInitializer {
@@ -19,7 +18,8 @@ public class Main implements ModInitializer {
VPFood.vpFood();
VPTools.vpTools();
VPArmor.vpArmor();
- VPOreGen.vpOres();
+ new VPOreConfiguredFeatures();
+ //VPOreGen.vpOres();
VPFuels.vpFuels();
}
}
diff --git a/src/main/java/tech/nevets/vplus/VPBlocks.java b/src/main/java/tech/nevets/vplus/VPBlocks.java
new file mode 100644
index 0000000..4f57481
--- /dev/null
+++ b/src/main/java/tech/nevets/vplus/VPBlocks.java
@@ -0,0 +1,48 @@
+package tech.nevets.vplus;
+
+import net.minecraft.block.*;
+import net.minecraft.item.BlockItem;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemGroup;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.math.intprovider.IntProvider;
+import net.minecraft.util.registry.Registry;
+import tech.nevets.vplus.items.VPItemGroups;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class VPBlocks extends Blocks {
+ public static final List BLOCKS = new ArrayList<>();
+ public static final Block SAPPHIRE_ORE;
+ public static final Block RUBY_ORE;
+ public static final Block JADE_ORE;
+
+ public VPBlocks() {
+ }
+
+ static {
+ SAPPHIRE_ORE = register("sapphire_ore", new OreBlock(AbstractBlock.Settings.of(Material.STONE).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.ALL).getBlock();
+ RUBY_ORE = register("ruby_ore", new OreBlock(AbstractBlock.Settings.of(Material.STONE).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.ALL).getBlock();
+ JADE_ORE = register("jade_ore", new OreBlock(AbstractBlock.Settings.of(Material.STONE).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.ALL).getBlock();
+
+ ///////////////////\\\\ITERATOR////\\\\\\\\\\\\\\\\\\\
+
+ for (Block block : BLOCKS) {
+ for (BlockState blockState : block.getStateManager().getStates()) {
+ Block.STATE_IDS.add(blockState);
+ }
+ block.getLootTableId();
+ }
+ }
+
+ /*
+ Use blockItem.getBlock(); to get instance of the block if needed
+ */
+ private static BlockItem register(String id, Block block, ItemGroup group) {
+ BLOCKS.add(block);
+ Registry.register(Registry.BLOCK, new Identifier("vplus", id), block);
+ return Registry.register(Registry.ITEM, new Identifier("vplus", id), new BlockItem(block, new Item.Settings().group(group)));
+ }
+
+}
diff --git a/src/main/java/tech/nevets/vplus/armor/ArmorMaterials.java b/src/main/java/tech/nevets/vplus/armor/ArmorMaterials.java
index add3432..fb54bc2 100644
--- a/src/main/java/tech/nevets/vplus/armor/ArmorMaterials.java
+++ b/src/main/java/tech/nevets/vplus/armor/ArmorMaterials.java
@@ -15,18 +15,10 @@ import tech.nevets.vplus.items.VPItems;
import java.util.function.Supplier;
public enum ArmorMaterials implements ArmorMaterial {
- COPPER("copper", 13, new int[]{2, 4, 5, 2}, 20, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F, 0.0F, () -> {
- return Ingredient.ofItems(new ItemConvertible[]{Items.COPPER_INGOT});
- }),
- EMERALD("emerald", 30, new int[]{2, 6, 8, 2}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.0F, () -> {
- return Ingredient.ofItems(new ItemConvertible[]{Items.EMERALD});
- }),
- PLATINUM("platinum", 40, new int[]{6, 8, 10, 6}, 40, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.5F, () -> {
- return Ingredient.ofItems(new ItemConvertible[]{VPItems.PLATINUMINGOT});
- }),
- RUBY("ruby", 75, new int[]{10, 15, 20, 10}, 100, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 4.0F, 1.0F, () -> {
- return Ingredient.ofItems(new ItemConvertible[]{VPItems.RUBY});
- });
+ COPPER("copper", 13, new int[]{2, 4, 5, 2}, 20, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F, 0.0F, () -> Ingredient.ofItems(Items.COPPER_INGOT)),
+ EMERALD("emerald", 30, new int[]{2, 6, 8, 2}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.0F, () -> Ingredient.ofItems(Items.EMERALD)),
+ PLATINUM("platinum", 40, new int[]{6, 8, 10, 6}, 40, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.5F, () -> Ingredient.ofItems(VPItems.PLATINUMINGOT)),
+ RUBY("ruby", 75, new int[]{10, 15, 20, 10}, 100, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 4.0F, 1.0F, () -> Ingredient.ofItems(VPItems.RUBY));
private static final int[] BASE_DURABILITY = new int[]{13, 15, 16, 11};
private final String name;
@@ -38,7 +30,7 @@ public enum ArmorMaterials implements ArmorMaterial {
private final float knockbackResistance;
private final Lazy repairIngredientSupplier;
- private ArmorMaterials(String name, int durabilityMultiplier, int[] protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier repairIngredientSupplier) {
+ ArmorMaterials(String name, int durabilityMultiplier, int[] protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier repairIngredientSupplier) {
this.name = name;
this.durabilityMultiplier = durabilityMultiplier;
this.protectionAmounts = protectionAmounts;
@@ -66,7 +58,7 @@ public enum ArmorMaterials implements ArmorMaterial {
}
public Ingredient getRepairIngredient() {
- return (Ingredient)this.repairIngredientSupplier.get();
+ return this.repairIngredientSupplier.get();
}
@Environment(EnvType.CLIENT)
diff --git a/src/main/java/tech/nevets/vplus/blocks/ColorTorchBlock.java b/src/main/java/tech/nevets/vplus/blocks/ColorTorchBlock.java
index 80516b0..34afea9 100644
--- a/src/main/java/tech/nevets/vplus/blocks/ColorTorchBlock.java
+++ b/src/main/java/tech/nevets/vplus/blocks/ColorTorchBlock.java
@@ -37,9 +37,9 @@ public class ColorTorchBlock extends Block {
}
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
- double d = (double)pos.getX() + 0.5D;
- double e = (double)pos.getY() + 0.7D;
- double f = (double)pos.getZ() + 0.5D;
+ double d = (double) pos.getX() + 0.5D;
+ double e = (double) pos.getY() + 0.7D;
+ double f = (double) pos.getZ() + 0.5D;
world.addParticle(ParticleTypes.SMOKE, d, e, f, 0.0D, 0.0D, 0.0D);
world.addParticle(this.particle, d, e, f, 0.0D, 0.0D, 0.0D);
}
diff --git a/src/main/java/tech/nevets/vplus/blocks/ColorWallTorchBlock.java b/src/main/java/tech/nevets/vplus/blocks/ColorWallTorchBlock.java
index 4f6390a..0bc3127 100644
--- a/src/main/java/tech/nevets/vplus/blocks/ColorWallTorchBlock.java
+++ b/src/main/java/tech/nevets/vplus/blocks/ColorWallTorchBlock.java
@@ -8,7 +8,6 @@ import net.minecraft.particle.ParticleEffect;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.DirectionProperty;
-import net.minecraft.state.property.Property;
import net.minecraft.util.BlockMirror;
import net.minecraft.util.BlockRotation;
import net.minecraft.util.math.BlockPos;
@@ -30,7 +29,7 @@ public class ColorWallTorchBlock extends TorchBlock {
protected ColorWallTorchBlock(Settings settings, ParticleEffect particleEffect) {
super(settings, particleEffect);
- this.setDefaultState((BlockState)((BlockState)this.stateManager.getDefaultState()).with(FACING, Direction.NORTH));
+ this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH));
}
public String getTranslationKey() {
@@ -42,11 +41,11 @@ public class ColorWallTorchBlock extends TorchBlock {
}
public static VoxelShape getBoundingShape(BlockState state) {
- return (VoxelShape)BOUNDING_SHAPES.get(state.get(FACING));
+ return BOUNDING_SHAPES.get(state.get(FACING));
}
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
- Direction direction = (Direction)state.get(FACING);
+ Direction direction = state.get(FACING);
BlockPos blockPos = pos.offset(direction.getOpposite());
BlockState blockState = world.getBlockState(blockPos);
return blockState.isSideSolidFullSquare(world, blockPos, direction);
@@ -65,7 +64,7 @@ public class ColorWallTorchBlock extends TorchBlock {
Direction direction = var6[var8];
if (direction.getAxis().isHorizontal()) {
Direction direction2 = direction.getOpposite();
- blockState = (BlockState)blockState.with(FACING, direction2);
+ blockState = blockState.with(FACING, direction2);
if (blockState.canPlaceAt(worldView, blockPos)) {
return blockState;
}
@@ -80,7 +79,7 @@ public class ColorWallTorchBlock extends TorchBlock {
}
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
- Direction direction = (Direction)state.get(FACING);
+ Direction direction = state.get(FACING);
double d = (double)pos.getX() + 0.5D;
double e = (double)pos.getY() + 0.7D;
double f = (double)pos.getZ() + 0.5D;
@@ -92,15 +91,15 @@ public class ColorWallTorchBlock extends TorchBlock {
}
public BlockState rotate(BlockState state, BlockRotation rotation) {
- return (BlockState)state.with(FACING, rotation.rotate((Direction)state.get(FACING)));
+ return state.with(FACING, rotation.rotate(state.get(FACING)));
}
public BlockState mirror(BlockState state, BlockMirror mirror) {
- return state.rotate(mirror.getRotation((Direction)state.get(FACING)));
+ return state.rotate(mirror.getRotation(state.get(FACING)));
}
protected void appendProperties(StateManager.Builder builder) {
- builder.add(new Property[]{FACING});
+ builder.add(FACING);
}
static {
diff --git a/src/main/java/tech/nevets/vplus/blocks/LavaSpongeBlock.java b/src/main/java/tech/nevets/vplus/blocks/LavaSpongeBlock.java
index 85da91a..51dad9d 100644
--- a/src/main/java/tech/nevets/vplus/blocks/LavaSpongeBlock.java
+++ b/src/main/java/tech/nevets/vplus/blocks/LavaSpongeBlock.java
@@ -45,7 +45,7 @@ public class LavaSpongeBlock extends Block {
int i = 0;
while(!queue.isEmpty()) {
- Pair pair = (Pair)queue.poll();
+ Pair pair = queue.poll();
BlockPos blockPos = (BlockPos)pair.getLeft();
int j = (Integer)pair.getRight();
Direction[] var8 = Direction.values();
diff --git a/src/main/java/tech/nevets/vplus/blocks/PlatinumBlock.java b/src/main/java/tech/nevets/vplus/blocks/PlatinumBlock.java
index cd028af..58e2dcf 100644
--- a/src/main/java/tech/nevets/vplus/blocks/PlatinumBlock.java
+++ b/src/main/java/tech/nevets/vplus/blocks/PlatinumBlock.java
@@ -1,7 +1,6 @@
package tech.nevets.vplus.blocks;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
-import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecraft.sound.BlockSoundGroup;
@@ -9,6 +8,6 @@ import net.minecraft.sound.BlockSoundGroup;
//TODO Change platinum to saphire
public class PlatinumBlock extends Block {
public PlatinumBlock() {
- super(FabricBlockSettings.of(Material.STONE).breakByHand(false).breakByTool(FabricToolTags.PICKAXES).sounds(BlockSoundGroup.METAL).strength(30, 1000f));
+ super(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.METAL).strength(30, 1000f));
}
}
diff --git a/src/main/java/tech/nevets/vplus/blocks/PlatinumOre.java b/src/main/java/tech/nevets/vplus/blocks/PlatinumOre.java
index c9fb578..6da4478 100644
--- a/src/main/java/tech/nevets/vplus/blocks/PlatinumOre.java
+++ b/src/main/java/tech/nevets/vplus/blocks/PlatinumOre.java
@@ -1,7 +1,6 @@
package tech.nevets.vplus.blocks;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
-import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
@@ -12,17 +11,17 @@ import net.minecraft.server.world.ServerWorld;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
-
-import java.util.Random;
+import net.minecraft.util.math.random.Random;
public class PlatinumOre extends Block {
public PlatinumOre() {
- super(FabricBlockSettings.of(Material.STONE).breakByTool(FabricToolTags.PICKAXES, 3).sounds(BlockSoundGroup.STONE).strength(3, 1500f));
+ super(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).strength(3, 1500f));
}
protected int getExperienceWhenMined(Random random) {
return MathHelper.nextInt(random, 3, 7);
}
+ /*
public void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack stack) {
super.onStacksDropped(state, world, pos, stack);
if (EnchantmentHelper.getLevel(Enchantments.SILK_TOUCH, stack) == 0) {
@@ -31,6 +30,6 @@ public class PlatinumOre extends Block {
this.dropExperience(world, pos, i);
}
}
-
}
+ */
}
diff --git a/src/main/java/tech/nevets/vplus/blocks/RubyBlock.java b/src/main/java/tech/nevets/vplus/blocks/RubyBlock.java
index 21a1e2b..bd5696a 100644
--- a/src/main/java/tech/nevets/vplus/blocks/RubyBlock.java
+++ b/src/main/java/tech/nevets/vplus/blocks/RubyBlock.java
@@ -1,13 +1,12 @@
package tech.nevets.vplus.blocks;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
-import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecraft.sound.BlockSoundGroup;
public class RubyBlock extends Block {
public RubyBlock() {
- super(FabricBlockSettings.of(Material.STONE).breakByHand(false).breakByTool(FabricToolTags.PICKAXES).sounds(BlockSoundGroup.METAL).strength(5, 6.0f));
+ super(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.METAL).strength(5, 6.0f));
}
}
diff --git a/src/main/java/tech/nevets/vplus/blocks/RubyOre.java b/src/main/java/tech/nevets/vplus/blocks/RubyOre.java
index 7a7a2c6..f222be5 100644
--- a/src/main/java/tech/nevets/vplus/blocks/RubyOre.java
+++ b/src/main/java/tech/nevets/vplus/blocks/RubyOre.java
@@ -1,7 +1,6 @@
package tech.nevets.vplus.blocks;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
-import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
@@ -12,17 +11,17 @@ import net.minecraft.server.world.ServerWorld;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
-
-import java.util.Random;
+import net.minecraft.util.math.random.Random;
public class RubyOre extends Block {
public RubyOre() {
- super(FabricBlockSettings.of(Material.STONE).breakByTool(FabricToolTags.PICKAXES, 3).sounds(BlockSoundGroup.STONE).strength(3, 1500f));
+ super(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).strength(3, 1500f));
}
protected int getExperienceWhenMined(Random random) {
return MathHelper.nextInt(random, 3, 7);
}
+ /*
public void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack stack) {
super.onStacksDropped(state, world, pos, stack);
if (EnchantmentHelper.getLevel(Enchantments.SILK_TOUCH, stack) == 0) {
@@ -32,4 +31,5 @@ public class RubyOre extends Block {
}
}
}
+ */
}
diff --git a/src/main/java/tech/nevets/vplus/blocks/SaturatedLavaSpongeBlock.java b/src/main/java/tech/nevets/vplus/blocks/SaturatedLavaSpongeBlock.java
index 47413da..422b6c5 100644
--- a/src/main/java/tech/nevets/vplus/blocks/SaturatedLavaSpongeBlock.java
+++ b/src/main/java/tech/nevets/vplus/blocks/SaturatedLavaSpongeBlock.java
@@ -10,10 +10,9 @@ import net.minecraft.particle.ParticleTypes;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
+import net.minecraft.util.math.random.Random;
import net.minecraft.world.World;
-import java.util.Random;
-
public class SaturatedLavaSpongeBlock extends Block {
public SaturatedLavaSpongeBlock() {
diff --git a/src/main/java/tech/nevets/vplus/blocks/VPBlocks.java b/src/main/java/tech/nevets/vplus/blocks/VPBlocks.java
index 9313997..bdc6f0d 100644
--- a/src/main/java/tech/nevets/vplus/blocks/VPBlocks.java
+++ b/src/main/java/tech/nevets/vplus/blocks/VPBlocks.java
@@ -44,7 +44,7 @@ public class VPBlocks {
}
public static void initializeTorches() {
- Registry.register(Registry.BLOCK, new Identifier("vplus", "green_torch"), new ColorTorchBlock(AbstractBlock.Settings.of(Material.DECORATION).noCollision().breakInstantly().luminance((state) -> {return 14;}).sounds(BlockSoundGroup.WOOD), ParticleTypes.FLAME));
- Registry.register(Registry.BLOCK, new Identifier("vplus", "green_wall_torch"), new ColorWallTorchBlock(AbstractBlock.Settings.of(Material.DECORATION).noCollision().breakInstantly().luminance((state) -> {return 14;}).sounds(BlockSoundGroup.WOOD).dropsLike(Blocks.TORCH), ParticleTypes.FLAME));
+ Registry.register(Registry.BLOCK, new Identifier("vplus", "green_torch"), new ColorTorchBlock(AbstractBlock.Settings.of(Material.DECORATION).noCollision().breakInstantly().luminance((state) -> 14).sounds(BlockSoundGroup.WOOD), ParticleTypes.FLAME));
+ Registry.register(Registry.BLOCK, new Identifier("vplus", "green_wall_torch"), new ColorWallTorchBlock(AbstractBlock.Settings.of(Material.DECORATION).noCollision().breakInstantly().luminance((state) -> 14).sounds(BlockSoundGroup.WOOD).dropsLike(Blocks.TORCH), ParticleTypes.FLAME));
}
}
diff --git a/src/main/java/tech/nevets/vplus/blocks/VPVerticalSlabs.java b/src/main/java/tech/nevets/vplus/blocks/VPVerticalSlabs.java
index 642a186..04cc1ce 100644
--- a/src/main/java/tech/nevets/vplus/blocks/VPVerticalSlabs.java
+++ b/src/main/java/tech/nevets/vplus/blocks/VPVerticalSlabs.java
@@ -1,7 +1,6 @@
package tech.nevets.vplus.blocks;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
-import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecraft.item.BlockItem;
@@ -14,6 +13,8 @@ import tech.nevets.vplus.items.VPItemGroups;
public class VPVerticalSlabs {
//TODO add new 1.17 blocks
+ //TODO add new 1.18 blocks
+ //TODO add new 1.19 blocks
public static final Block VERTICAL_OAK_SLAB;
public static final Block VERTICAL_SPRUCE_SLAB;
@@ -137,44 +138,44 @@ public class VPVerticalSlabs {
}
static {
- VERTICAL_OAK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F).breakByTool(FabricToolTags.AXES));
- VERTICAL_SPRUCE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F).breakByTool(FabricToolTags.AXES));
- VERTICAL_BIRCH_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F).breakByTool(FabricToolTags.AXES));
- VERTICAL_JUNGLE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F).breakByTool(FabricToolTags.AXES));
- VERTICAL_ACACIA_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F).breakByTool(FabricToolTags.AXES));
- VERTICAL_DARK_OAK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F).breakByTool(FabricToolTags.AXES));
- VERTICAL_CRIMSON_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F).breakByTool(FabricToolTags.AXES));
- VERTICAL_WARPED_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F).breakByTool(FabricToolTags.AXES));
- VERTICAL_STONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_SMOOTH_STONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_CUT_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_COBBLESTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_STONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_NETHER_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_QUARTZ_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_RED_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_CUT_RED_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_PURPUR_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_PRISMARINE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_PRISMARINE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_DARK_PRISMARINE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_POLISHED_GRANITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_SMOOTH_RED_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_MOSSY_STONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_POLISHED_DIORITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_MOSSY_COBBLESTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_END_STONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_SMOOTH_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_SMOOTH_QUARTZ_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_GRANITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_ANDESITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_RED_NETHER_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_POLISHED_ANDESITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_DIORITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_BLACKSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_POLISHED_BLACKSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
- VERTICAL_POLISHED_BLACKSTONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F).breakByHand(false).breakByTool(FabricToolTags.PICKAXES));
+ VERTICAL_OAK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
+ VERTICAL_SPRUCE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
+ VERTICAL_BIRCH_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
+ VERTICAL_JUNGLE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
+ VERTICAL_ACACIA_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
+ VERTICAL_DARK_OAK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
+ VERTICAL_CRIMSON_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
+ VERTICAL_WARPED_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
+ VERTICAL_STONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_SMOOTH_STONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_CUT_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_COBBLESTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_STONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_NETHER_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_QUARTZ_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_RED_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_CUT_RED_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_PURPUR_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_PRISMARINE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_PRISMARINE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_DARK_PRISMARINE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_POLISHED_GRANITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_SMOOTH_RED_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_MOSSY_STONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_POLISHED_DIORITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_MOSSY_COBBLESTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_END_STONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_SMOOTH_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_SMOOTH_QUARTZ_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_GRANITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_ANDESITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_RED_NETHER_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_POLISHED_ANDESITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_DIORITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_BLACKSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_POLISHED_BLACKSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
+ VERTICAL_POLISHED_BLACKSTONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
}
}
diff --git a/src/main/java/tech/nevets/vplus/blocks/VerticalSlabs.java b/src/main/java/tech/nevets/vplus/blocks/VerticalSlabs.java
index baab485..ceb1fc0 100644
--- a/src/main/java/tech/nevets/vplus/blocks/VerticalSlabs.java
+++ b/src/main/java/tech/nevets/vplus/blocks/VerticalSlabs.java
@@ -14,7 +14,6 @@ import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockView;
-
public class VerticalSlabs extends HorizontalFacingBlock {
private static final VoxelShape NORTH_SHAPE;
private static final VoxelShape EAST_SHAPE;
@@ -29,8 +28,8 @@ public class VerticalSlabs extends HorizontalFacingBlock {
//TODO Fix Waterlogging
@Override
- public FluidState getFluidState(BlockState blockState_1) {
- return (Boolean)blockState_1.get(WATERLOGGED) ? Fluids.WATER.getStill(false) : super.getFluidState(blockState_1);
+ public FluidState getFluidState(BlockState blockState) {
+ return blockState.get(WATERLOGGED) ? Fluids.WATER.getStill(false) : super.getFluidState(blockState);
}
@Override
diff --git a/src/main/java/tech/nevets/vplus/food/EnchantedCopperApple.java b/src/main/java/tech/nevets/vplus/food/EnchantedCopperApple.java
index f765b59..4c8df8c 100644
--- a/src/main/java/tech/nevets/vplus/food/EnchantedCopperApple.java
+++ b/src/main/java/tech/nevets/vplus/food/EnchantedCopperApple.java
@@ -12,6 +12,7 @@ public class EnchantedCopperApple extends Item {
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(12).saturationModifier(16).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 6),1f).build()));
}
+ @Override
public boolean hasGlint(ItemStack stack) {
return true;
}
diff --git a/src/main/java/tech/nevets/vplus/food/EnchantedDiamondApple.java b/src/main/java/tech/nevets/vplus/food/EnchantedDiamondApple.java
index 8f83579..55f318e 100644
--- a/src/main/java/tech/nevets/vplus/food/EnchantedDiamondApple.java
+++ b/src/main/java/tech/nevets/vplus/food/EnchantedDiamondApple.java
@@ -12,6 +12,7 @@ public class EnchantedDiamondApple extends Item {
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(8).saturationModifier(14).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 4),1f).build()));
}
+ @Override
public boolean hasGlint(ItemStack stack) {
return true;
}
diff --git a/src/main/java/tech/nevets/vplus/food/EnchantedEmeraldApple.java b/src/main/java/tech/nevets/vplus/food/EnchantedEmeraldApple.java
index 33991ec..8d82ea5 100644
--- a/src/main/java/tech/nevets/vplus/food/EnchantedEmeraldApple.java
+++ b/src/main/java/tech/nevets/vplus/food/EnchantedEmeraldApple.java
@@ -12,6 +12,7 @@ public class EnchantedEmeraldApple extends Item {
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(12).saturationModifier(16).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 6),1f).build()));
}
+ @Override
public boolean hasGlint(ItemStack stack) {
return true;
}
diff --git a/src/main/java/tech/nevets/vplus/food/EnchantedIronApple.java b/src/main/java/tech/nevets/vplus/food/EnchantedIronApple.java
index 02357a7..cfac23d 100644
--- a/src/main/java/tech/nevets/vplus/food/EnchantedIronApple.java
+++ b/src/main/java/tech/nevets/vplus/food/EnchantedIronApple.java
@@ -12,6 +12,7 @@ public class EnchantedIronApple extends Item {
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()));
}
+ @Override
public boolean hasGlint(ItemStack stack) {
return true;
}
diff --git a/src/main/java/tech/nevets/vplus/food/EnchantedNetheriteApple.java b/src/main/java/tech/nevets/vplus/food/EnchantedNetheriteApple.java
index ab8b09f..e1ae3e6 100644
--- a/src/main/java/tech/nevets/vplus/food/EnchantedNetheriteApple.java
+++ b/src/main/java/tech/nevets/vplus/food/EnchantedNetheriteApple.java
@@ -12,6 +12,7 @@ public class EnchantedNetheriteApple extends Item {
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(14).saturationModifier(18).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 8),1f).build()));
}
+ @Override
public boolean hasGlint(ItemStack stack) {
return true;
}
diff --git a/src/main/java/tech/nevets/vplus/food/EnchantedPlatinumApple.java b/src/main/java/tech/nevets/vplus/food/EnchantedPlatinumApple.java
index 240205f..6752d56 100644
--- a/src/main/java/tech/nevets/vplus/food/EnchantedPlatinumApple.java
+++ b/src/main/java/tech/nevets/vplus/food/EnchantedPlatinumApple.java
@@ -12,6 +12,7 @@ public class EnchantedPlatinumApple extends Item {
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(16).saturationModifier(20).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 10),1f).build()));
}
+ @Override
public boolean hasGlint(ItemStack stack) {
return true;
}
diff --git a/src/main/java/tech/nevets/vplus/food/EnchantedRubyApple.java b/src/main/java/tech/nevets/vplus/food/EnchantedRubyApple.java
index 9d7e260..7c93f11 100644
--- a/src/main/java/tech/nevets/vplus/food/EnchantedRubyApple.java
+++ b/src/main/java/tech/nevets/vplus/food/EnchantedRubyApple.java
@@ -12,6 +12,7 @@ public class EnchantedRubyApple extends Item {
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(18).saturationModifier(22).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 12),1f).build()));
}
+ @Override
public boolean hasGlint(ItemStack stack) {
return true;
}
diff --git a/src/main/java/tech/nevets/vplus/init/ClientInit.java b/src/main/java/tech/nevets/vplus/init/ClientInit.java
index 65bdb6e..93818a8 100644
--- a/src/main/java/tech/nevets/vplus/init/ClientInit.java
+++ b/src/main/java/tech/nevets/vplus/init/ClientInit.java
@@ -3,7 +3,7 @@ package tech.nevets.vplus.init;
import net.fabricmc.api.ClientModInitializer;
import tech.nevets.vplus.misc.VPZoom;
-public class ClientInit implements ClientModInitializer {
+public class ClientInit implements ClientModInitializer {
@Override
public void onInitializeClient() {
diff --git a/src/main/java/tech/nevets/vplus/misc/VPOreGen.java b/src/main/java/tech/nevets/vplus/misc/VPOreGen.java
deleted file mode 100644
index e9861a6..0000000
--- a/src/main/java/tech/nevets/vplus/misc/VPOreGen.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package tech.nevets.vplus.misc;
-
-import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
-import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
-import net.minecraft.util.Identifier;
-import net.minecraft.util.registry.BuiltinRegistries;
-import net.minecraft.util.registry.Registry;
-import net.minecraft.util.registry.RegistryKey;
-import net.minecraft.world.gen.GenerationStep;
-import net.minecraft.world.gen.YOffset;
-import net.minecraft.world.gen.decorator.*;
-import net.minecraft.world.gen.feature.*;
-import tech.nevets.vplus.blocks.VPBlocks;
-
-public class VPOreGen {
-
- private static ConfiguredFeature, ?> ORE_PLATINUM_OVERWORLD_CONFIGURED = Feature.ORE
- .configure(new OreFeatureConfig(
- OreConfiguredFeatures.BASE_STONE_OVERWORLD,
- VPBlocks.PLATINUMORE.getDefaultState(),
- 3)); // vein size
- public static PlacedFeature ORE_PLATINUM_OVERWORLD_PLACED = ORE_PLATINUM_OVERWORLD_CONFIGURED.withPlacement(
- CountPlacementModifier.of(2), // number of veins per chunk
- SquarePlacementModifier.of(),
- HeightRangePlacementModifier.uniform(YOffset.getBottom(), YOffset.fixed(15))
- );
-
- private static ConfiguredFeature, ?> ORE_RUBY_OVERWORLD_CONFIGURED = Feature.ORE
- .configure(new OreFeatureConfig(
- OreConfiguredFeatures.BASE_STONE_OVERWORLD,
- VPBlocks.PLATINUMORE.getDefaultState(),
- 1)); // vein size
- public static PlacedFeature ORE_RUBY_OVERWORLD_PLACED = ORE_PLATINUM_OVERWORLD_CONFIGURED.withPlacement(
- CountPlacementModifier.of(8), // number of veins per chunk
- SquarePlacementModifier.of(),
- HeightRangePlacementModifier.uniform(YOffset.getBottom(), YOffset.fixed(15))
- );
-
- public static void vpOres() {
- Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new Identifier("vplus", "platinum_ore"), ORE_PLATINUM_OVERWORLD_CONFIGURED);
- Registry.register(BuiltinRegistries.PLACED_FEATURE, new Identifier("vplus", "platinum_ore"), ORE_PLATINUM_OVERWORLD_PLACED);
- BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES, RegistryKey.of(Registry.PLACED_FEATURE_KEY, new Identifier("vplus", "platinum_ore")));
-
- Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new Identifier("vplus", "ruby_ore"), ORE_RUBY_OVERWORLD_CONFIGURED);
- Registry.register(BuiltinRegistries.PLACED_FEATURE, new Identifier("vplus", "ruby_ore"), ORE_RUBY_OVERWORLD_PLACED);
- BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES, RegistryKey.of(Registry.PLACED_FEATURE_KEY, new Identifier("vplus", "ruby_ore")));
- }
-}
diff --git a/src/main/java/tech/nevets/vplus/tools/AxeBase.java b/src/main/java/tech/nevets/vplus/tools/AxeBase.java
index fd9dad5..13ab34b 100644
--- a/src/main/java/tech/nevets/vplus/tools/AxeBase.java
+++ b/src/main/java/tech/nevets/vplus/tools/AxeBase.java
@@ -5,7 +5,7 @@ import net.minecraft.item.ToolMaterial;
import tech.nevets.vplus.items.VPItemGroups;
public class AxeBase extends AxeItem {
- public AxeBase(ToolMaterial toolMaterial_1) {
- super(toolMaterial_1, 5, -3.0f, new Settings().group(VPItemGroups.TOOLS));
+ public AxeBase(ToolMaterial toolMaterial) {
+ super(toolMaterial, 5, -3.0f, new Settings().group(VPItemGroups.TOOLS));
}
}
diff --git a/src/main/java/tech/nevets/vplus/tools/HoeBase.java b/src/main/java/tech/nevets/vplus/tools/HoeBase.java
index 22d2ea4..1a4158a 100644
--- a/src/main/java/tech/nevets/vplus/tools/HoeBase.java
+++ b/src/main/java/tech/nevets/vplus/tools/HoeBase.java
@@ -5,7 +5,7 @@ import net.minecraft.item.ToolMaterial;
import tech.nevets.vplus.items.VPItemGroups;
public class HoeBase extends HoeItem {
- public HoeBase(ToolMaterial toolMaterial_1) {
- super(toolMaterial_1, -3, 0f, new Settings().group(VPItemGroups.TOOLS));
+ public HoeBase(ToolMaterial toolMaterial) {
+ super(toolMaterial, -3, 0f, new Settings().group(VPItemGroups.TOOLS));
}
}
diff --git a/src/main/java/tech/nevets/vplus/tools/PickaxeBase.java b/src/main/java/tech/nevets/vplus/tools/PickaxeBase.java
index e39d003..6a4f98b 100644
--- a/src/main/java/tech/nevets/vplus/tools/PickaxeBase.java
+++ b/src/main/java/tech/nevets/vplus/tools/PickaxeBase.java
@@ -5,7 +5,7 @@ import net.minecraft.item.ToolMaterial;
import tech.nevets.vplus.items.VPItemGroups;
public class PickaxeBase extends PickaxeItem {
- public PickaxeBase(ToolMaterial toolMaterial_1) {
- super(toolMaterial_1, 1, -2.8f, new Settings().group(VPItemGroups.TOOLS));
+ public PickaxeBase(ToolMaterial toolMaterial) {
+ super(toolMaterial, 1, -2.8f, new Settings().group(VPItemGroups.TOOLS));
}
}
diff --git a/src/main/java/tech/nevets/vplus/tools/ShovelBase.java b/src/main/java/tech/nevets/vplus/tools/ShovelBase.java
index 68f41ce..b3e9af9 100644
--- a/src/main/java/tech/nevets/vplus/tools/ShovelBase.java
+++ b/src/main/java/tech/nevets/vplus/tools/ShovelBase.java
@@ -5,7 +5,7 @@ import net.minecraft.item.ToolMaterial;
import tech.nevets.vplus.items.VPItemGroups;
public class ShovelBase extends ShovelItem {
- public ShovelBase(ToolMaterial toolMaterial_1) {
- super(toolMaterial_1, 1, -3f, new Settings().group(VPItemGroups.TOOLS));
+ public ShovelBase(ToolMaterial toolMaterial) {
+ super(toolMaterial, 1, -3f, new Settings().group(VPItemGroups.TOOLS));
}
}
diff --git a/src/main/java/tech/nevets/vplus/tools/SwordBase.java b/src/main/java/tech/nevets/vplus/tools/SwordBase.java
index 79e9b70..19edc68 100644
--- a/src/main/java/tech/nevets/vplus/tools/SwordBase.java
+++ b/src/main/java/tech/nevets/vplus/tools/SwordBase.java
@@ -5,7 +5,7 @@ import net.minecraft.item.ToolMaterial;
import tech.nevets.vplus.items.VPItemGroups;
public class SwordBase extends SwordItem {
- public SwordBase(ToolMaterial toolMaterial_1) {
- super(toolMaterial_1, 2, -2.4f, new Settings().group(VPItemGroups.COMBAT));
+ public SwordBase(ToolMaterial toolMaterial) {
+ super(toolMaterial, 2, -2.4f, new Settings().group(VPItemGroups.COMBAT));
}
}
diff --git a/src/main/java/tech/nevets/vplus/tools/ToolMaterials.java b/src/main/java/tech/nevets/vplus/tools/ToolMaterials.java
index 032af82..532dd5f 100644
--- a/src/main/java/tech/nevets/vplus/tools/ToolMaterials.java
+++ b/src/main/java/tech/nevets/vplus/tools/ToolMaterials.java
@@ -1,7 +1,6 @@
package tech.nevets.vplus.tools;
import java.util.function.Supplier;
-import net.minecraft.item.ItemConvertible;
import net.minecraft.item.Items;
import net.minecraft.item.ToolMaterial;
import net.minecraft.recipe.Ingredient;
@@ -9,18 +8,10 @@ import net.minecraft.util.Lazy;
import tech.nevets.vplus.items.VPItems;
public enum ToolMaterials implements ToolMaterial {
- COPPER (2, 200, 5.0F, 3.0F, 20, () -> {
- return Ingredient.ofItems(new ItemConvertible[]{Items.COPPER_INGOT});
- }),
- EMERALD(3, 750, 7.0F, 4.0F, 30, () -> {
- return Ingredient.ofItems(new ItemConvertible[]{Items.EMERALD});
- }),
- PLATINUM(4, 3000, 10.0F, 6.0F, 40, () -> {
- return Ingredient.ofItems(new ItemConvertible[]{VPItems.PLATINUMINGOT});
- }),
- RUBY(4, 5000, 12.0F, 10.0F, 100, () -> {
- return Ingredient.ofItems(new ItemConvertible[]{VPItems.RUBY});
- });
+ COPPER (2, 200, 5.0F, 3.0F, 20, () -> Ingredient.ofItems(Items.COPPER_INGOT)),
+ EMERALD(3, 750, 7.0F, 4.0F, 30, () -> Ingredient.ofItems(Items.EMERALD)),
+ PLATINUM(4, 3000, 10.0F, 6.0F, 40, () -> Ingredient.ofItems(VPItems.PLATINUMINGOT)),
+ RUBY(4, 5000, 12.0F, 10.0F, 100, () -> Ingredient.ofItems(VPItems.RUBY));
private final int miningLevel;
private final int itemDurability;
@@ -28,7 +19,7 @@ public enum ToolMaterials implements ToolMaterial {
private final float attackDamage;
private final int enchantability;
private final Lazy repairIngredient;
- private ToolMaterials(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier repairIngredient) {
+ ToolMaterials(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier repairIngredient) {
this.miningLevel = miningLevel;
this.itemDurability = itemDurability;
this.miningSpeed = miningSpeed;
diff --git a/src/main/java/tech/nevets/vplus/worldgen/VPOreGen.java b/src/main/java/tech/nevets/vplus/worldgen/VPOreGen.java
new file mode 100644
index 0000000..1043bb1
--- /dev/null
+++ b/src/main/java/tech/nevets/vplus/worldgen/VPOreGen.java
@@ -0,0 +1,10 @@
+package tech.nevets.vplus.worldgen;
+
+public class VPOreGen {
+
+ public VPOreGen() {
+ }
+
+ public static void generateOres() {
+ }
+}
diff --git a/src/main/java/tech/nevets/vplus/worldgen/features/VPOreConfiguredFeatures.java b/src/main/java/tech/nevets/vplus/worldgen/features/VPOreConfiguredFeatures.java
new file mode 100644
index 0000000..a61bb5a
--- /dev/null
+++ b/src/main/java/tech/nevets/vplus/worldgen/features/VPOreConfiguredFeatures.java
@@ -0,0 +1,28 @@
+package tech.nevets.vplus.worldgen.features;
+
+import net.minecraft.util.registry.RegistryEntry;
+import net.minecraft.world.gen.feature.*;
+import tech.nevets.vplus.VPBlocks;
+
+import java.util.List;
+
+public class VPOreConfiguredFeatures extends OreConfiguredFeatures {
+ public static final List SAPPHIRE_ORES;
+ public static final List RUBY_ORES;
+ public static final List JADE_ORES;
+ public static final RegistryEntry> ORE_SAPPHIRE;
+ public static final RegistryEntry> ORE_RUBY;
+ public static final RegistryEntry> ORE_JADE;
+
+ public VPOreConfiguredFeatures() {
+ }
+
+ static {
+ SAPPHIRE_ORES = List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.SAPPHIRE_ORE.getDefaultState()));
+ RUBY_ORES = List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.RUBY_ORE.getDefaultState()));
+ JADE_ORES = List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.RUBY_ORE.getDefaultState()));
+ ORE_SAPPHIRE = ConfiguredFeatures.register("ore_sapphire", Feature.ORE, new OreFeatureConfig(List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.SAPPHIRE_ORE.getDefaultState())), 4));
+ ORE_RUBY = ConfiguredFeatures.register("ore_ruby", Feature.ORE, new OreFeatureConfig(List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.RUBY_ORE.getDefaultState())), 3));
+ ORE_JADE = ConfiguredFeatures.register("ore_jade", Feature.ORE, new OreFeatureConfig(List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.JADE_ORE.getDefaultState())), 2));
+ }
+}
diff --git a/src/main/java/tech/nevets/vplus/worldgen/features/VPPlacedFeatures.java b/src/main/java/tech/nevets/vplus/worldgen/features/VPPlacedFeatures.java
new file mode 100644
index 0000000..d26f5d3
--- /dev/null
+++ b/src/main/java/tech/nevets/vplus/worldgen/features/VPPlacedFeatures.java
@@ -0,0 +1,37 @@
+package tech.nevets.vplus.worldgen.features;
+
+import net.minecraft.util.registry.RegistryEntry;
+import net.minecraft.world.gen.YOffset;
+import net.minecraft.world.gen.feature.OrePlacedFeatures;
+import net.minecraft.world.gen.feature.PlacedFeature;
+import net.minecraft.world.gen.feature.PlacedFeatures;
+import net.minecraft.world.gen.placementmodifier.*;
+
+import java.util.List;
+
+public class VPPlacedFeatures extends OrePlacedFeatures {
+ public static final RegistryEntry ORE_SAPPHIRE;
+ public static final RegistryEntry ORE_RUBY;
+ public static final RegistryEntry ORE_JADE;
+
+ public VPPlacedFeatures() {
+ }
+
+ private static List modifiers(PlacementModifier countModifier, PlacementModifier heightModifier) {
+ return List.of(countModifier, SquarePlacementModifier.of(), heightModifier, BiomePlacementModifier.of());
+ }
+
+ private static List modifiersWithCount(int count, PlacementModifier heightModifier) {
+ return modifiers(CountPlacementModifier.of(count), heightModifier);
+ }
+
+ private static List modifiersWithRarity(int chance, PlacementModifier heightModifier) {
+ return modifiers(RarityFilterPlacementModifier.of(chance), heightModifier);
+ }
+
+ static {
+ ORE_SAPPHIRE = PlacedFeatures.register("ore_sapphire", VPOreConfiguredFeatures.ORE_SAPPHIRE, modifiersWithCount(4, HeightRangePlacementModifier.trapezoid(YOffset.fixed(0), YOffset.fixed(24))));
+ ORE_RUBY = PlacedFeatures.register("ore_ruby", VPOreConfiguredFeatures.ORE_RUBY, modifiersWithCount(3, HeightRangePlacementModifier.uniform(YOffset.fixed(-12), YOffset.fixed(0))));
+ ORE_JADE = PlacedFeatures.register("ore_jade", VPOreConfiguredFeatures.ORE_SAPPHIRE, modifiersWithCount(2, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-24), YOffset.fixed(-12))));
+ }
+}
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index 41c2d2c..69fba99 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -37,9 +37,9 @@
],
"depends": {
- "fabricloader": ">=0.12.9",
+ "fabricloader": ">=0.14.6",
"fabric": "*",
- "minecraft": "1.18.x",
+ "minecraft": "~1.19",
"java": ">=17"
},
"suggests": {
diff --git a/src/main/resources/vplus.accesswidener b/src/main/resources/vplus.accesswidener
new file mode 100644
index 0000000..2432436
--- /dev/null
+++ b/src/main/resources/vplus.accesswidener
@@ -0,0 +1,2 @@
+accessWidener v1 named
+accessible method net/minecraft/world/gen/densityfunction/DensityFunctions createSurfaceNoiseRouter (Lnet/minecraft/util/registry/Registry;boolean;boolean;)Lnet/minecraft/world/gen/noise/NoiseRouter;
\ No newline at end of file