Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.mcreator.kieselskatastrophicmod.procedures;
- import net.minecraftforge.registries.ForgeRegistries;
- import net.minecraftforge.fml.common.Mod;
- import net.minecraftforge.eventbus.api.SubscribeEvent;
- import net.minecraftforge.eventbus.api.Event;
- import net.minecraftforge.event.entity.player.PlayerInteractEvent;
- import net.minecraft.world.level.block.state.properties.Property;
- import net.minecraft.world.level.block.state.BlockState;
- import net.minecraft.world.level.block.Blocks;
- import net.minecraft.world.level.LevelAccessor;
- import net.minecraft.world.level.Level;
- import net.minecraft.world.item.ItemStack;
- import net.minecraft.world.entity.LivingEntity;
- import net.minecraft.world.entity.Entity;
- import net.minecraft.sounds.SoundSource;
- import net.minecraft.resources.ResourceLocation;
- import net.minecraft.core.BlockPos;
- import net.mcreator.kieselskatastrophicmod.network.KieselsKatastrophicModModVariables;
- import net.mcreator.kieselskatastrophicmod.init.KieselsKatastrophicModModItems;
- import net.mcreator.kieselskatastrophicmod.init.KieselsKatastrophicModModBlocks;
- import javax.annotation.Nullable;
- import java.util.Map;
- @Mod.EventBusSubscriber
- public class VarnishstripperprocessProcedure {
- @SubscribeEvent
- public static void onRightClickItem(PlayerInteractEvent.RightClickItem event) {
- if (event.getHand() != event.getEntity().getUsedItemHand())
- return;
- execute(event, event.getLevel(), event.getPos().getX(), event.getPos().getY(), event.getPos().getZ(), event.getEntity());
- }
- public static void execute(LevelAccessor world, double x, double y, double z, Entity entity) {
- execute(null, world, x, y, z, entity);
- }
- private static void execute(@Nullable Event event, LevelAccessor world, double x, double y, double z, Entity entity) {
- if (entity == null)
- return;
- BlockState wheatBlock = Blocks.AIR.defaultBlockState();
- BlockState WhitePetals4 = Blocks.AIR.defaultBlockState();
- BlockState varnish = Blocks.AIR.defaultBlockState();
- BlockState varnishstripper = Blocks.AIR.defaultBlockState();
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.APPLE_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.APPLE_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.APPLE_STRIPPED_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.APPLE_STRIPPED_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.APPLE_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.ORANGE_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.ORANGE_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.ORANGE_STRIPPED_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.ORANGE_STRIPPED_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.ORANGE_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LEMON_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LEMON_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LEMON_STRIPPED_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LEMON_STRIPPED_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LEMON_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LIME_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LIME_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LIME_STRIPPED_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LIME_STRIPPED_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LIME_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.PEAR_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.PEAR_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_PEAR_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_PEAR_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.PEAR_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.MINT_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.MINT_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_MINT_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_MINT_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.MINT_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.BLUEBERRY_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.BLUEBERRY_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_BLUEBERRY_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_BLUEBERRY_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.BLUEBERRY_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.BLACKBERRY_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.BLACKBERRY_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_BLACKBERRY_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_BLACKBERRY_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.BLACKBERRY_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.PLUM_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.PLUM_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_PLUM_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_PLUM_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.PLUM_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.GRAPE_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.GRAPE_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_GRAPE_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_GRAPE_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.GRAPE_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.BROWN_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.BROWN_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_BROWN_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.BROWN_STRIPPED_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.BROWN_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LIGHT_GRAY_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LIGHT_GRAY_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_LIGHT_GRAY_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_LIGHT_GRAY_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.LIGHT_GRAY_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.GRAY_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.GRAY_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_GRAY_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_GRAY_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.GRAY_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.CHARCOAL_PLANKS.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_PLANKS.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.CHARCOAL_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_CHARCOAL_LOG.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_LOG.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.STRIPPED_CHARCOAL_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.STRIPPED_PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == KieselsKatastrophicModModItems.VARNISH_STRIPPER.get()) {
- KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish = (world.getBlockState(BlockPos.containing(x, y, z)));
- KieselsKatastrophicModModVariables.MapVariables.get(world).syncData(world);
- if (KieselsKatastrophicModModVariables.MapVariables.get(world).Varnish.getBlock() == KieselsKatastrophicModModBlocks.CHARCOAL_WOOD.get()) {
- {
- BlockPos _bp = BlockPos.containing(x, y, z);
- BlockState _bs = KieselsKatastrophicModModBlocks.PAPER_WOOD.get().defaultBlockState();
- BlockState _bso = world.getBlockState(_bp);
- for (Map.Entry<Property<?>, Comparable<?>> entry : _bso.getValues().entrySet()) {
- Property _property = _bs.getBlock().getStateDefinition().getProperty(entry.getKey().getName());
- if (_property != null && _bs.getValue(_property) != null)
- try {
- _bs = _bs.setValue(_property, (Comparable) entry.getValue());
- } catch (Exception e) {
- }
- }
- world.setBlock(_bp, _bs, 3);
- }
- if (world instanceof Level _level) {
- if (!_level.isClientSide()) {
- _level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1);
- } else {
- _level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.brewing_stand.brew")), SoundSource.NEUTRAL, 1, 1, false);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment