Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
706167bca2 | |||
081b744755 |
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="16" />
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
@ -29,7 +29,12 @@
|
||||
<remote-repository>
|
||||
<option name="id" value="UserLocalRemappedMods" />
|
||||
<option name="name" value="UserLocalRemappedMods" />
|
||||
<option name="url" value="file:/$PROJECT_DIR$/../../../Minecraft%20Mods%20and%20Plugins/Fabric/VanillaPlus/.gradle/loom-cache/remapped_mods/" />
|
||||
<option name="url" value="file:/$USER_HOME$/Minecraft%20Mods%20and%20Plugins/Fabric/VanillaPlus/.gradle/loom-cache/remapped_mods/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="UserLocalRemappedMods" />
|
||||
<option name="name" value="UserLocalRemappedMods" />
|
||||
<option name="url" value="file:/$PROJECT_DIR$/.gradle/loom-cache/remapped_mods/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -4,7 +4,7 @@
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="azul-16" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="temurin-17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
15
build.gradle
@ -1,10 +1,10 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '0.9-SNAPSHOT'
|
||||
id 'fabric-loom' version '0.12-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
@ -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
|
||||
|
||||
@ -32,7 +36,7 @@ processResources {
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.encoding = "UTF-8"
|
||||
it.options.release = 16
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
java {
|
||||
@ -43,4 +47,5 @@ jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
# Done to increase the memory available to gradle.
|
||||
#org.gradle.jvmargs=-Xmx2G
|
||||
org.gradle.jvmargs=-Xmx4G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/versions.html
|
||||
minecraft_version=1.17.1
|
||||
yarn_mappings=1.17.1+build.63
|
||||
loader_version=0.11.7
|
||||
minecraft_version=1.19
|
||||
yarn_mappings=1.19+build.1
|
||||
loader_version=0.14.6
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 0.2.0
|
||||
mod_version = 1.1.2
|
||||
maven_group = tech.nevets
|
||||
archives_base_name = vplus
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.41.0+1.17
|
||||
fabric_version=0.55.1+1.19
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -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,8 +18,8 @@ public class Main implements ModInitializer {
|
||||
VPFood.vpFood();
|
||||
VPTools.vpTools();
|
||||
VPArmor.vpArmor();
|
||||
VPOreGen.vpOres();
|
||||
new VPOreConfiguredFeatures();
|
||||
//VPOreGen.vpOres();
|
||||
VPFuels.vpFuels();
|
||||
VPZoom.vpZoom();
|
||||
}
|
||||
}
|
||||
|
48
src/main/java/tech/nevets/vplus/VPBlocks.java
Normal file
@ -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<Block> 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)));
|
||||
}
|
||||
|
||||
}
|
@ -15,15 +15,10 @@ import tech.nevets.vplus.items.VPItems;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public enum ArmorMaterials implements ArmorMaterial {
|
||||
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;
|
||||
@ -35,7 +30,7 @@ public enum ArmorMaterials implements ArmorMaterial {
|
||||
private final float knockbackResistance;
|
||||
private final Lazy<Ingredient> repairIngredientSupplier;
|
||||
|
||||
private ArmorMaterials(String name, int durabilityMultiplier, int[] protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredientSupplier) {
|
||||
ArmorMaterials(String name, int durabilityMultiplier, int[] protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredientSupplier) {
|
||||
this.name = name;
|
||||
this.durabilityMultiplier = durabilityMultiplier;
|
||||
this.protectionAmounts = protectionAmounts;
|
||||
@ -63,7 +58,7 @@ public enum ArmorMaterials implements ArmorMaterial {
|
||||
}
|
||||
|
||||
public Ingredient getRepairIngredient() {
|
||||
return (Ingredient)this.repairIngredientSupplier.get();
|
||||
return this.repairIngredientSupplier.get();
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
|
@ -7,6 +7,7 @@ import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class VPArmor {
|
||||
|
||||
public static final ArmorMaterial COPPER_ARMOR = ArmorMaterials.COPPER;
|
||||
public static final ArmorMaterial EMERALD_ARMOR = ArmorMaterials.EMERALD;
|
||||
public static final ArmorMaterial PLATINUM_ARMOR = ArmorMaterials.PLATINUM;
|
||||
public static final ArmorMaterial RUBY_ARMOR = ArmorMaterials.RUBY;
|
||||
@ -19,24 +20,28 @@ public class VPArmor {
|
||||
}
|
||||
|
||||
public static void initializeHelmet() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_helmet"), new BaseArmor(COPPER_ARMOR, EquipmentSlot.HEAD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_helmet"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.HEAD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_helmet"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.HEAD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_helmet"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.HEAD));
|
||||
}
|
||||
|
||||
public static void initializeChestplates() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_chestplate"), new BaseArmor(COPPER_ARMOR, EquipmentSlot.CHEST));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_chestplate"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.CHEST));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_chestplate"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.CHEST));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_chestplate"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.CHEST));
|
||||
}
|
||||
|
||||
public static void initialzeLeggings() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_leggings"), new BaseArmor(COPPER_ARMOR, EquipmentSlot.LEGS));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_leggings"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.LEGS));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_leggings"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.LEGS));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_leggings"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.LEGS));
|
||||
}
|
||||
|
||||
public static void initializeBoots() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_boots"), new BaseArmor(COPPER_ARMOR, EquipmentSlot.FEET));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_boots"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.FEET));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_boots"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.FEET));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_boots"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.FEET));
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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<Block, BlockState> builder) {
|
||||
builder.add(new Property[]{FACING});
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
static {
|
||||
|
@ -45,7 +45,7 @@ public class LavaSpongeBlock extends Block {
|
||||
int i = 0;
|
||||
|
||||
while(!queue.isEmpty()) {
|
||||
Pair<BlockPos, Integer> pair = (Pair)queue.poll();
|
||||
Pair pair = queue.poll();
|
||||
BlockPos blockPos = (BlockPos)pair.getLeft();
|
||||
int j = (Integer)pair.getRight();
|
||||
Direction[] var8 = Direction.values();
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
@ -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() {
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
package tech.nevets.vplus.mixin;
|
||||
package tech.nevets.vplus.clientmixin;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
@ -13,7 +13,7 @@ import tech.nevets.vplus.misc.VPZoom;
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Mixin(GameRenderer.class)
|
||||
public class ZoomMixin {
|
||||
@Inject(method = "getFov(Lnet/minecraft/client/render/Camera;FZ)D", at = @At("HEAD"), cancellable = true)
|
||||
@Inject(method = "getFov(Lnet/minecraft/client/render/Camera;FZ)D", at = @At("RETURN"), cancellable = true)
|
||||
public void getZoomLevel(CallbackInfoReturnable<Double> callbackInfo) {
|
||||
if(ZoomInit.isZooming()) {
|
||||
callbackInfo.setReturnValue(VPZoom.zoomLevel);
|
13
src/main/java/tech/nevets/vplus/food/CopperApple.java
Normal file
@ -0,0 +1,13 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class CopperApple extends Item {
|
||||
public CopperApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(12).saturationModifier(16).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 5),1f).build()));
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class EnchantedCopperApple extends Item {
|
||||
public EnchantedCopperApple() {
|
||||
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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ public class VPFood {
|
||||
|
||||
public static final Item IRONAPPLE = new IronApple();
|
||||
public static final Item ENCHANTEDIRONAPPLE = new EnchantedIronApple();
|
||||
public static final Item COPPERAPPLE = new CopperApple();
|
||||
public static final Item ENCHANTEDCOPPERAPPLE = new EnchantedCopperApple();
|
||||
public static final Item DIAMONDAPPLE = new DiamondApple();
|
||||
public static final Item ENCHANTEDDIAMONDAPPLE = new EnchantedDiamondApple();
|
||||
public static final Item EMERALDAPPLE = new EmeraldApple();
|
||||
@ -27,6 +29,8 @@ public class VPFood {
|
||||
public static void initializeApples() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "iron_apple"), IRONAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_iron_apple"), ENCHANTEDIRONAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_apple"), COPPERAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_copper_apple"), ENCHANTEDCOPPERAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "diamond_apple"), DIAMONDAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_diamond_apple"), ENCHANTEDDIAMONDAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_apple"), EMERALDAPPLE);
|
||||
|
12
src/main/java/tech/nevets/vplus/init/ClientInit.java
Normal file
@ -0,0 +1,12 @@
|
||||
package tech.nevets.vplus.init;
|
||||
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import tech.nevets.vplus.misc.VPZoom;
|
||||
|
||||
public class ClientInit implements ClientModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
VPZoom.vpZoom();
|
||||
}
|
||||
}
|
@ -1,52 +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.Decorator;
|
||||
import net.minecraft.world.gen.decorator.RangeDecoratorConfig;
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.OreFeatureConfig;
|
||||
import net.minecraft.world.gen.heightprovider.UniformHeightProvider;
|
||||
import tech.nevets.vplus.blocks.VPBlocks;
|
||||
|
||||
public class VPOreGen {
|
||||
|
||||
private static ConfiguredFeature<?, ?> ORE_PLATINUM_OVERWORLD = Feature.ORE
|
||||
.configure(new OreFeatureConfig(
|
||||
OreFeatureConfig.Rules.BASE_STONE_OVERWORLD,
|
||||
VPBlocks.PLATINUMORE.getDefaultState(),
|
||||
3)) // vein size
|
||||
.range(new RangeDecoratorConfig(
|
||||
UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.fixed(15))))
|
||||
.spreadHorizontally()
|
||||
.repeat(2); // number of veins per chunk
|
||||
|
||||
private static ConfiguredFeature<?, ?> ORE_RUBY_OVERWORLD = Feature.ORE
|
||||
.configure(new OreFeatureConfig(
|
||||
OreFeatureConfig.Rules.BASE_STONE_OVERWORLD,
|
||||
VPBlocks.RUBYORE.getDefaultState(),
|
||||
1)) // vein size
|
||||
.range(new RangeDecoratorConfig(
|
||||
UniformHeightProvider.create(YOffset.aboveBottom(0), YOffset.fixed(256))))
|
||||
.spreadHorizontally()
|
||||
.repeat(8); // number of veins per chunk
|
||||
|
||||
public static void vpOres() {
|
||||
RegistryKey<ConfiguredFeature<?, ?>> platinumOreOverworld = RegistryKey.of(Registry.CONFIGURED_FEATURE_KEY,
|
||||
new Identifier("vplus", "platinum_ore"));
|
||||
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, platinumOreOverworld.getValue(), ORE_PLATINUM_OVERWORLD);
|
||||
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES, platinumOreOverworld);
|
||||
|
||||
RegistryKey<ConfiguredFeature<?, ?>> rubyOreOverworld = RegistryKey.of(Registry.CONFIGURED_FEATURE_KEY,
|
||||
new Identifier("vplus", "ruby_ore"));
|
||||
Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, rubyOreOverworld.getValue(), ORE_RUBY_OVERWORLD);
|
||||
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES, rubyOreOverworld);
|
||||
}
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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,15 +8,10 @@ import net.minecraft.util.Lazy;
|
||||
import tech.nevets.vplus.items.VPItems;
|
||||
|
||||
public enum ToolMaterials implements ToolMaterial {
|
||||
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;
|
||||
@ -25,7 +19,7 @@ public enum ToolMaterials implements ToolMaterial {
|
||||
private final float attackDamage;
|
||||
private final int enchantability;
|
||||
private final Lazy<Ingredient> repairIngredient;
|
||||
private ToolMaterials(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier<Ingredient> repairIngredient) {
|
||||
ToolMaterials(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier<Ingredient> repairIngredient) {
|
||||
this.miningLevel = miningLevel;
|
||||
this.itemDurability = itemDurability;
|
||||
this.miningSpeed = miningSpeed;
|
||||
|
@ -14,30 +14,35 @@ public class VPTools {
|
||||
}
|
||||
|
||||
public static void initializeAxes() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_axe"), new AxeBase(ToolMaterials.COPPER));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_axe"), new AxeBase(ToolMaterials.EMERALD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_axe"), new AxeBase(ToolMaterials.PLATINUM));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_axe"), new AxeBase(ToolMaterials.RUBY));
|
||||
}
|
||||
|
||||
public static void initializeHoes() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_hoe"), new HoeBase(ToolMaterials.COPPER));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_hoe"), new HoeBase(ToolMaterials.EMERALD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_hoe"), new HoeBase(ToolMaterials.PLATINUM));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_hoe"), new HoeBase(ToolMaterials.RUBY));
|
||||
}
|
||||
|
||||
public static void initializePickaxes() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_pickaxe"), new PickaxeBase(ToolMaterials.COPPER));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_pickaxe"), new PickaxeBase(ToolMaterials.EMERALD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_pickaxe"), new PickaxeBase(ToolMaterials.PLATINUM));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_pickaxe"), new PickaxeBase(ToolMaterials.RUBY));
|
||||
}
|
||||
|
||||
public static void initializeShovels() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_shovel"), new ShovelBase(ToolMaterials.COPPER));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_shovel"), new ShovelBase(ToolMaterials.EMERALD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_shovel"), new ShovelBase(ToolMaterials.PLATINUM));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_shovel"), new ShovelBase(ToolMaterials.RUBY));
|
||||
}
|
||||
|
||||
public static void initializeSwords() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_sword"), new SwordBase(ToolMaterials.COPPER));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_sword"), new SwordBase(ToolMaterials.EMERALD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_sword"), new SwordBase(ToolMaterials.PLATINUM));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_sword"), new SwordBase(ToolMaterials.RUBY));
|
||||
|
10
src/main/java/tech/nevets/vplus/worldgen/VPOreGen.java
Normal file
@ -0,0 +1,10 @@
|
||||
package tech.nevets.vplus.worldgen;
|
||||
|
||||
public class VPOreGen {
|
||||
|
||||
public VPOreGen() {
|
||||
}
|
||||
|
||||
public static void generateOres() {
|
||||
}
|
||||
}
|
@ -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<OreFeatureConfig.Target> SAPPHIRE_ORES;
|
||||
public static final List<OreFeatureConfig.Target> RUBY_ORES;
|
||||
public static final List<OreFeatureConfig.Target> JADE_ORES;
|
||||
public static final RegistryEntry<ConfiguredFeature<OreFeatureConfig, ?>> ORE_SAPPHIRE;
|
||||
public static final RegistryEntry<ConfiguredFeature<OreFeatureConfig, ?>> ORE_RUBY;
|
||||
public static final RegistryEntry<ConfiguredFeature<OreFeatureConfig, ?>> 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));
|
||||
}
|
||||
}
|
@ -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<PlacedFeature> ORE_SAPPHIRE;
|
||||
public static final RegistryEntry<PlacedFeature> ORE_RUBY;
|
||||
public static final RegistryEntry<PlacedFeature> ORE_JADE;
|
||||
|
||||
public VPPlacedFeatures() {
|
||||
}
|
||||
|
||||
private static List<PlacementModifier> modifiers(PlacementModifier countModifier, PlacementModifier heightModifier) {
|
||||
return List.of(countModifier, SquarePlacementModifier.of(), heightModifier, BiomePlacementModifier.of());
|
||||
}
|
||||
|
||||
private static List<PlacementModifier> modifiersWithCount(int count, PlacementModifier heightModifier) {
|
||||
return modifiers(CountPlacementModifier.of(count), heightModifier);
|
||||
}
|
||||
|
||||
private static List<PlacementModifier> 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))));
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 2.3 KiB |
@ -19,10 +19,15 @@
|
||||
"item.vplus.platinum_nugget": "Platinum Nugget",
|
||||
"item.vplus.ruby": "Ruby",
|
||||
|
||||
"item.vplus.copper_sword": "Copper Sword",
|
||||
"item.vplus.emerald_sword": "Emerald Sword",
|
||||
"item.vplus.platinum_sword": "Platinum Sword",
|
||||
"item.vplus.ruby_sword": "Ruby Sword",
|
||||
|
||||
"item.vplus.copper_helmet": "Copper Helmet",
|
||||
"item.vplus.copper_chestplate": "Copper Chestplate",
|
||||
"item.vplus.copper_leggings": "Copper Leggings",
|
||||
"item.vplus.copper_boots": "Copper Boots",
|
||||
"item.vplus.emerald_helmet": "Emerald Helmet",
|
||||
"item.vplus.emerald_chestplate": "Emerald Chestplate",
|
||||
"item.vplus.emerald_leggings": "Emerald Leggings",
|
||||
@ -36,6 +41,10 @@
|
||||
"item.vplus.ruby_leggings": "Ruby Leggings",
|
||||
"item.vplus.ruby_boots": "Ruby Boots",
|
||||
|
||||
"item.vplus.copper_pickaxe": "Copper Pickaxe",
|
||||
"item.vplus.copper_axe": "Copper Axe",
|
||||
"item.vplus.copper_shovel": "Copper Shovel",
|
||||
"item.vplus.copper_hoe": "Copper Hoe",
|
||||
"item.vplus.emerald_pickaxe": "Emerald Pickaxe",
|
||||
"item.vplus.emerald_axe": "Emerald Axe",
|
||||
"item.vplus.emerald_shovel": "Emerald Shovel",
|
||||
@ -51,12 +60,14 @@
|
||||
|
||||
"item.vplus.iron_apple": "Iron Apple",
|
||||
"item.vplus.enchanted_iron_apple": "Enchanted Iron Apple",
|
||||
"item.vplus.copper_apple": "Copper Apple",
|
||||
"item.vplus.enchanted_copper_apple": "Enchanted Copper Apple",
|
||||
"item.vplus.diamond_apple": "Diamond Apple",
|
||||
"item.vplus.enchanted_diamond_apple": "Enchanted Diamond Apple",
|
||||
"item.vplus.emerald_apple": "Emerald Apple",
|
||||
"item.vplus.enchanted_emerald_apple": "Enchanted Emerald Apple",
|
||||
"item.vplus.netherite_apple": "Netherite Apple",
|
||||
"item.vplus.enchanted_Netherite_apple": "Enchanted Netherite Apple",
|
||||
"item.vplus.enchanted_netherite_apple": "Enchanted Netherite Apple",
|
||||
"item.vplus.platinum_apple": "Platinum Apple",
|
||||
"item.vplus.enchanted_platinum_apple": "Enchanted Platinum Apple",
|
||||
"item.vplus.ruby_apple": "Ruby Apple",
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/copper_apple"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/copper_axe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/copper_boots"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/copper_chestplate"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/copper_helmet"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/copper_hoe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/copper_leggings"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/copper_pickaxe"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/copper_shovel"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/copper_sword"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/enchanted_copper_apple"
|
||||
}
|
||||
}
|
BIN
src/main/resources/assets/vplus/textures/item/copper_apple.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
src/main/resources/assets/vplus/textures/item/copper_axe.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/main/resources/assets/vplus/textures/item/copper_boots.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.8 KiB |
BIN
src/main/resources/assets/vplus/textures/item/copper_helmet.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/main/resources/assets/vplus/textures/item/copper_hoe.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.8 KiB |
BIN
src/main/resources/assets/vplus/textures/item/copper_pickaxe.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
src/main/resources/assets/vplus/textures/item/copper_shovel.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
src/main/resources/assets/vplus/textures/item/copper_sword.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" #",
|
||||
"###",
|
||||
"# #"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:diamond"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "minecraft:diamond_horse_armor",
|
||||
"count": 1
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" g",
|
||||
"ggg",
|
||||
"g g"
|
||||
],
|
||||
"key": {
|
||||
"g": {
|
||||
"item": "minecraft:gold_ingot"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "minecraft:golden_horse_armor",
|
||||
"count": 1
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" i",
|
||||
"iii",
|
||||
"i i"
|
||||
],
|
||||
"key": {
|
||||
"i": {
|
||||
"item": "minecraft:iron_ingot"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "minecraft:iron_horse_armor",
|
||||
"count": 1
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" #",
|
||||
"###",
|
||||
"# #"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:leather"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "minecraft:leather_horse_armor",
|
||||
"count": 1
|
||||
}
|
||||
}
|
20
src/main/resources/data/minecraft/recipes/nametag.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"#i#",
|
||||
" # ",
|
||||
" # "
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:string"
|
||||
},
|
||||
"i": {
|
||||
"item": "minecraft:iron_ingot"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "minecraft:name_tag",
|
||||
"count": 1
|
||||
}
|
||||
}
|
19
src/main/resources/data/minecraft/recipes/saddle.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"#i#",
|
||||
"# #"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:leather"
|
||||
},
|
||||
"i": {
|
||||
"item": "minecraft:iron_ingot"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "minecraft:saddle",
|
||||
"count": 1
|
||||
}
|
||||
}
|
20
src/main/resources/data/vplus/recipes/copper_apple.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"iii",
|
||||
"iAi",
|
||||
"iii"
|
||||
],
|
||||
"key": {
|
||||
"i": {
|
||||
"item": "minecraft:copper_ingot"
|
||||
},
|
||||
"A": {
|
||||
"item": "minecraft:apple"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "vplus:copper_apple",
|
||||
"count": 1
|
||||
}
|
||||
}
|
19
src/main/resources/data/vplus/recipes/copper_axe.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"XX",
|
||||
"X#",
|
||||
" #"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:stick"
|
||||
},
|
||||
"X": {
|
||||
"item": "minecraft:copper_ingot"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "vplus:copper_axe"
|
||||
}
|
||||
}
|
16
src/main/resources/data/vplus/recipes/copper_boots.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"# #",
|
||||
"# #"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:copper_ingot"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "vplus:copper_boots",
|
||||
"count": 1
|
||||
}
|
||||
}
|
17
src/main/resources/data/vplus/recipes/copper_chestplate.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"# #",
|
||||
"###",
|
||||
"###"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:copper_ingot"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "vplus:copper_chestplate",
|
||||
"count": 1
|
||||
}
|
||||
}
|
16
src/main/resources/data/vplus/recipes/copper_helmet.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"###",
|
||||
"# #"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:copper_ingot"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "vplus:copper_helmet",
|
||||
"count": 1
|
||||
}
|
||||
}
|
20
src/main/resources/data/vplus/recipes/copper_hoe.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"##",
|
||||
" /",
|
||||
" /"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:copper_ingot"
|
||||
},
|
||||
"/": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "vplus:copper_hoe",
|
||||
"count": 1
|
||||
}
|
||||
}
|
17
src/main/resources/data/vplus/recipes/copper_leggings.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"###",
|
||||
"# #",
|
||||
"# #"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:copper_ingot"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "vplus:copper_leggings",
|
||||
"count": 1
|
||||
}
|
||||
}
|
20
src/main/resources/data/vplus/recipes/copper_pickaxe.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"###",
|
||||
" / ",
|
||||
" / "
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:copper_ingot"
|
||||
},
|
||||
"/": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "vplus:copper_pickaxe",
|
||||
"count": 1
|
||||
}
|
||||
}
|
20
src/main/resources/data/vplus/recipes/copper_shovel.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"#",
|
||||
"/",
|
||||
"/"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:copper_ingot"
|
||||
},
|
||||
"/": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "vplus:copper_shovel",
|
||||
"count": 1
|
||||
}
|
||||
}
|
20
src/main/resources/data/vplus/recipes/copper_sword.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"#",
|
||||
"#",
|
||||
"/"
|
||||
],
|
||||
"key": {
|
||||
"#": {
|
||||
"item": "minecraft:copper_ingot"
|
||||
},
|
||||
"/": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "vplus:copper_sword",
|
||||
"count": 1
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"iii",
|
||||
"iAi",
|
||||
"iii"
|
||||
],
|
||||
"key": {
|
||||
"i": {
|
||||
"item": "minecraft:copper_block"
|
||||
},
|
||||
"A": {
|
||||
"item": "minecraft:apple"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "vplus:enchanted_copper_apple",
|
||||
"count": 1
|
||||
}
|
||||
}
|
@ -6,11 +6,11 @@
|
||||
"name": "Vanilla Plus",
|
||||
"description": "Adding things that should be in the vanilla game!",
|
||||
"authors": [
|
||||
"nevetS-718"
|
||||
"Steven"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://nevets.tech/",
|
||||
"sources": "https://github.com/nevetS-718/VanillaPlus"
|
||||
"sources": "https://git.nevets.tech/Steven/VanillaPlus"
|
||||
},
|
||||
|
||||
"license": "CC0-1.0",
|
||||
@ -20,19 +20,28 @@
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"tech.nevets.vplus.Main"
|
||||
],
|
||||
"client": [
|
||||
"tech.nevets.vplus.init.ClientInit"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"vplus.mixins.json"
|
||||
{
|
||||
"config": "vplus.mixins.json",
|
||||
"environment": "server"
|
||||
},
|
||||
{
|
||||
"config": "vplus.clientmixins.json",
|
||||
"environment": "client"
|
||||
}
|
||||
],
|
||||
|
||||
"depends": {
|
||||
"fabricloader": ">=0.11.3",
|
||||
"fabricloader": ">=0.14.6",
|
||||
"fabric": "*",
|
||||
"minecraft": "1.17.x",
|
||||
"java": ">=16"
|
||||
"minecraft": "~1.19",
|
||||
"java": ">=17"
|
||||
},
|
||||
"suggests": {
|
||||
"another-mod": "*"
|
||||
}
|
||||
}
|
2
src/main/resources/vplus.accesswidener
Normal file
@ -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;
|
13
src/main/resources/vplus.clientmixins.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"required": true,
|
||||
"package": "tech.nevets.vplus.clientmixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
"ZoomMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
@ -1,14 +1,12 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"required": false,
|
||||
"package": "tech.nevets.vplus.mixin",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"mixins": [
|
||||
"ZoomMixin"
|
||||
],
|
||||
"client": [
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
"defaultRequire": 0
|
||||
}
|
||||
}
|