mirror of
https://github.com/TeamMidnightDust/ThisRocks.git
synced 2025-12-17 11:25:10 +01:00
revert: 1.21.1 backport
This commit is contained in:
@@ -9,7 +9,7 @@ import net.minecraft.util.math.Vec3d;
|
||||
|
||||
public class ParticleUtil {
|
||||
public static void spawnParticle(ServerPlayerEntity player, ParticleType<?> type, Vec3d pos, Vec3d offset, float speed) {
|
||||
ServerPlayNetworking.getSender(player).sendPacket(new ParticleS2CPacket((ParticleEffect) type, false, pos.x, pos.y, pos.z,
|
||||
ServerPlayNetworking.getSender(player).sendPacket(new ParticleS2CPacket((ParticleEffect) type, false, true, pos.x, pos.y, pos.z,
|
||||
(float) offset.x / 16f, (float) offset.y / 16f, (float) offset.z / 16f, speed, 1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class RegistryUtil {
|
||||
}
|
||||
public static Item blockItem(Block block, Identifier id) {
|
||||
if (polymerMode) return PolyUtil.polymerBlockItem(block, id);
|
||||
return new BlockItem(block, new Item.Settings());
|
||||
return new BlockItem(block, new Item.Settings().registryKey(RegistryKey.of(RegistryKeys.ITEM, id)));
|
||||
}
|
||||
public static Item registerItem(Identifier id, Item item) {
|
||||
Registry.register(Registries.ITEM, id, item);
|
||||
|
||||
@@ -12,7 +12,7 @@ import static eu.midnightdust.motschen.rocks.RocksMain.id;
|
||||
public enum StickType {
|
||||
OAK("oak", Blocks.OAK_LOG), SPRUCE("spruce", Blocks.SPRUCE_LOG), BIRCH("birch", Blocks.BIRCH_LOG),
|
||||
JUNGLE("jungle", Blocks.JUNGLE_LOG), ACACIA("acacia", Blocks.ACACIA_LOG), DARK_OAK("dark_oak", Blocks.DARK_OAK_LOG),
|
||||
CHERRY("cherry", Blocks.CHERRY_LOG), MANGROVE("mangrove", Blocks.MANGROVE_LOG),
|
||||
CHERRY("cherry", Blocks.CHERRY_LOG), MANGROVE("mangrove", Blocks.MANGROVE_LOG), PALE_OAK("pale_oak", Blocks.PALE_OAK_LOG),
|
||||
|
||||
BAMBOO("bamboo", Blocks.BAMBOO_BLOCK), WARPED("warped", Blocks.WARPED_STEM), CRIMSON("crimson", Blocks.CRIMSON_STEM);
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import eu.pb4.polymer.core.api.block.PolymerBlockUtils;
|
||||
import eu.pb4.polymer.core.api.item.PolymerItemGroupUtils;
|
||||
import eu.pb4.polymer.core.api.utils.PolymerSyncUtils;
|
||||
import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils;
|
||||
import eu.pb4.polymer.resourcepack.extras.api.ResourcePackExtras;
|
||||
import eu.pb4.polymer.virtualentity.api.ElementHolder;
|
||||
import eu.pb4.polymer.virtualentity.api.attachment.BlockBoundAttachment;
|
||||
import eu.pb4.polymer.virtualentity.impl.HolderHolder;
|
||||
@@ -49,6 +50,10 @@ public class PolyUtil {
|
||||
if (PASSABLE_WATERLOGGED_BLOCK == null) SMALL_BLOCK = Blocks.BARRIER.getDefaultState().with(WATERLOGGED, true);
|
||||
|
||||
PolymerResourcePackUtils.addModAssets(MOD_ID);
|
||||
ResourcePackExtras.forDefault().addBridgedModelsFolder(id("block"), id("rocks"));
|
||||
ResourcePackExtras.forDefault().addBridgedModelsFolder(polymerId("block"), polymerId("polymer-rocks"));
|
||||
ResourcePackExtras.forDefault().addBridgedModelsFolder(polymerId("item"), polymerId("polymer-rocks"));
|
||||
|
||||
ItemDisplayNetherGeyserModel.initModels();
|
||||
ItemDisplayOverworldGeyserModel.initModels();
|
||||
ItemDisplayPineconeModel.initModels();
|
||||
@@ -66,8 +71,8 @@ public class PolyUtil {
|
||||
}
|
||||
|
||||
public static Item polymerBlockItem(Block block, Identifier id) {
|
||||
if (block instanceof Starfish) return new StarfishItemPolymer((Block & PolymerBlock) block, new Item.Settings(), Items.KELP);
|
||||
else return new FactoryBlockItem((Block & PolymerBlock) block, new Item.Settings(), Items.KELP);
|
||||
if (block instanceof Starfish) return new StarfishItemPolymer((Block & PolymerBlock) block, new Item.Settings().registryKey(RegistryKey.of(RegistryKeys.ITEM, id)), Items.KELP);
|
||||
else return new FactoryBlockItem((Block & PolymerBlock) block, new Item.Settings().registryKey(RegistryKey.of(RegistryKeys.ITEM, id)), Items.KELP);
|
||||
}
|
||||
|
||||
public static Item simplePolymerItem(Identifier id) {
|
||||
|
||||
Reference in New Issue
Block a user