purely an update to 1.20.1
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
package dev.venomcode.jumpvader;
|
||||
|
||||
import dev.venomcode.jumpvader.blocks.JumpVaderBlock;
|
||||
import eu.pb4.polymer.api.item.PolymerBlockItem;
|
||||
import eu.pb4.polymer.core.api.item.PolymerBlockItem;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -26,13 +26,13 @@ public class JumpVaderMod implements ModInitializer {
|
||||
{
|
||||
config = new JumpVaderConfig();
|
||||
|
||||
Registry.register( Registry.BLOCK, new Identifier(JumpVaderMod.MODID, "jumpvader_block"), JUMP_VADER_BLOCK);
|
||||
Registry.register(Registries.BLOCK, new Identifier(JumpVaderMod.MODID, "jumpvader_block"), JUMP_VADER_BLOCK);
|
||||
|
||||
Registry.register( Registry.ITEM, new Identifier(JumpVaderMod.MODID, "jumpvader_block"), new PolymerBlockItem( JUMP_VADER_BLOCK, new FabricItemSettings(), Items.ORANGE_STAINED_GLASS ) );
|
||||
Registry.register( Registries.ITEM, new Identifier(JumpVaderMod.MODID, "jumpvader_block"), new PolymerBlockItem( JUMP_VADER_BLOCK, new FabricItemSettings(), Items.ORANGE_STAINED_GLASS ) );
|
||||
}
|
||||
public static JumpVaderConfig getConfig()
|
||||
{
|
||||
return config;
|
||||
}
|
||||
public static final JumpVaderBlock JUMP_VADER_BLOCK = new JumpVaderBlock(FabricBlockSettings.of(Material.GLASS), Blocks.ORANGE_STAINED_GLASS);
|
||||
public static final JumpVaderBlock JUMP_VADER_BLOCK = new JumpVaderBlock(FabricBlockSettings.copyOf(Blocks.BAMBOO_PLANKS), Blocks.ORANGE_STAINED_GLASS);
|
||||
}
|
||||
|
@@ -2,12 +2,13 @@ package dev.venomcode.jumpvader.blocks;
|
||||
|
||||
import dev.venomcode.jumpvader.JumpVaderMod;
|
||||
import dev.venomcode.jumpvader.ifaces.IJumpVaderListener;
|
||||
import eu.pb4.polymer.api.block.SimplePolymerBlock;
|
||||
import eu.pb4.polymer.core.api.block.PolymerBlock;
|
||||
import eu.pb4.polymer.core.api.block.SimplePolymerBlock;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
@@ -16,11 +17,10 @@ import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderListener
|
||||
{
|
||||
public JumpVaderBlock(Settings settings, Block virtualBlock)
|
||||
{
|
||||
super(settings, virtualBlock);
|
||||
public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderListener {
|
||||
|
||||
public JumpVaderBlock(Settings settings, Block polymerBlock) {
|
||||
super(settings, polymerBlock);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -29,7 +29,7 @@ public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderList
|
||||
if(!JumpVaderMod.getConfig().getEnabled())
|
||||
return false;
|
||||
pos = pos.up();
|
||||
ServerWorld w = player.getWorld();
|
||||
ServerWorld w = (ServerWorld) player.getWorld();
|
||||
int count = 0;
|
||||
|
||||
while(count < JumpVaderMod.getConfig().getMaxVerticalBlocks() && pos.getY() < 316)
|
||||
@@ -63,7 +63,7 @@ public class JumpVaderBlock extends SimplePolymerBlock implements IJumpVaderList
|
||||
return;
|
||||
|
||||
pos = pos.down();
|
||||
ServerWorld w = player.getWorld();
|
||||
ServerWorld w = (ServerWorld) player.getWorld();
|
||||
int count = 0;
|
||||
|
||||
while(count < JumpVaderMod.getConfig().getMaxVerticalBlocks() && pos.getY() >= -64)
|
||||
|
@@ -27,10 +27,10 @@
|
||||
],
|
||||
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.9",
|
||||
"fabric-api": "*",
|
||||
"minecraft": "~1.19",
|
||||
"java": ">=17"
|
||||
"fabricloader": ">=0.14.21",
|
||||
"minecraft": "~1.20.1",
|
||||
"java": ">=17",
|
||||
"fabric-api": "*"
|
||||
},
|
||||
"suggests": {
|
||||
"another-mod": "*"
|
||||
|
Reference in New Issue
Block a user