diff --git a/src/main/java/electroblob/wizardry/block/BlockReceptacle.java b/src/main/java/electroblob/wizardry/block/BlockReceptacle.java new file mode 100644 index 00000000..72983785 --- /dev/null +++ b/src/main/java/electroblob/wizardry/block/BlockReceptacle.java @@ -0,0 +1,211 @@ +package electroblob.wizardry.block; + +import com.google.common.collect.Maps; +import electroblob.wizardry.constants.Element; +import electroblob.wizardry.item.ItemSpectralDust; +import electroblob.wizardry.registry.WizardryItems; +import electroblob.wizardry.registry.WizardrySounds; +import electroblob.wizardry.registry.WizardryTabs; +import electroblob.wizardry.tileentity.TileEntityReceptacle; +import electroblob.wizardry.util.ParticleBuilder; +import electroblob.wizardry.util.WizardryUtilities; +import net.minecraft.block.BlockTorch; +import net.minecraft.block.ITileEntityProvider; +import net.minecraft.block.SoundType; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.NonNullList; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +import javax.annotation.Nullable; +import java.util.Map; +import java.util.Random; + +public class BlockReceptacle extends BlockTorch implements ITileEntityProvider { + + protected static final AxisAlignedBB STANDING_AABB = new AxisAlignedBB(4/16d, 0/16d, 4/16d, 12/16d, 8/16d, 12/16d); + protected static final AxisAlignedBB NORTH_WALL_AABB = new AxisAlignedBB(4/16d, 2/16d, 7/16d, 12/16d, 10/16d, 16/16d); + protected static final AxisAlignedBB SOUTH_WALL_AABB = new AxisAlignedBB(4/16d, 2/16d, 0/16d, 12/16d, 10/16d, 9/16d); + protected static final AxisAlignedBB WEST_WALL_AABB = new AxisAlignedBB(7/16d, 2/16d, 4/16d, 16/16d, 10/16d, 12/16d); + protected static final AxisAlignedBB EAST_WALL_AABB = new AxisAlignedBB(0/16d, 2/16d, 4/16d, 9/16d, 10/16d, 12/16d); + + private static final double WALL_PARTICLE_OFFSET = 3/16d; + + private static final Map PARTICLE_COLOURS; + + static { + + Map map = Maps.newEnumMap(Element.class); + + map.put(Element.MAGIC, new int[]{0xe4c7cd, 0xfeffbe, 0x9d2cf3}); + map.put(Element.FIRE, new int[]{0xff9600, 0xfffe67, 0xd02700}); + map.put(Element.ICE, new int[]{0xa3e8f4, 0xe9f9fc, 0x138397}); + map.put(Element.LIGHTNING, new int[]{0x409ee1, 0xf5f0ff, 0x225474}); + map.put(Element.NECROMANCY, new int[]{0xa811ce, 0xf575f5, 0x382366}); + map.put(Element.EARTH, new int[]{0xa8f408, 0xc8ffb2, 0x795c28}); + map.put(Element.SORCERY, new int[]{0x56e8e3, 0xe8fcfc, 0x16a64d}); + map.put(Element.HEALING, new int[]{0xfff69e, 0xfffff6, 0xa18200}); + + PARTICLE_COLOURS = Maps.immutableEnumMap(map); + } + + public BlockReceptacle(){ + super(); + this.setCreativeTab(WizardryTabs.WIZARDRY); + this.setHardness(0); + this.setLightLevel(0.5f); + this.setSoundType(SoundType.STONE); + } + + @Override + public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos){ + switch(state.getValue(FACING)){ + case EAST: return EAST_WALL_AABB; + case WEST: return WEST_WALL_AABB; + case SOUTH: return SOUTH_WALL_AABB; + case NORTH: return NORTH_WALL_AABB; + default: return STANDING_AABB; + } + } + + @Override + public AxisAlignedBB getCollisionBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos){ + return state.getBoundingBox(world, pos); + } + + @Override + public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos){ + + TileEntity tileEntity = world.getTileEntity(pos); + + if(tileEntity instanceof TileEntityReceptacle && ((TileEntityReceptacle)tileEntity).getElement() != null){ + return super.getLightValue(state, world, pos); // Return super to use float value from constructor + } + + return 0; + } + + @Override + public void getDrops(NonNullList drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ + + super.getDrops(drops, world, pos, state, fortune); + + TileEntity tileEntity = world.getTileEntity(pos); + + if(tileEntity instanceof TileEntityReceptacle){ + Element element = ((TileEntityReceptacle)tileEntity).getElement(); + if(element != null) drops.add(new ItemStack(WizardryItems.spectral_dust, 1, element.ordinal())); + } + } + + // See BlockFlowerPot for these two (this class is essentially based on a flower pot) + + @Override + public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest){ + if(willHarvest) return true; // If it will harvest, delay deletion of the block until after getDrops + return super.removedByPlayer(state, world, pos, player, willHarvest); + } + + @Override + public void harvestBlock(World world, EntityPlayer player, BlockPos pos, IBlockState state, @Nullable TileEntity te, ItemStack tool){ + super.harvestBlock(world, player, pos, state, te, tool); + world.setBlockToAir(pos); + } + + @Override + public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ){ + + TileEntity tileEntity = world.getTileEntity(pos); + + ItemStack stack = player.getHeldItem(hand); + + if(tileEntity instanceof TileEntityReceptacle){ + + Element currentElement = ((TileEntityReceptacle)tileEntity).getElement(); + + if(currentElement == null){ + + if(stack.getItem() instanceof ItemSpectralDust && stack.getMetadata() >= 0 + && stack.getMetadata() < Element.values().length){ + + ((TileEntityReceptacle)tileEntity).setElement(Element.values()[stack.getMetadata()]); + if(!player.capabilities.isCreativeMode) stack.shrink(1); + world.playSound(pos.getX(), pos.getY(), pos.getZ(), WizardrySounds.BLOCK_RECEPTACLE_IGNITE, + SoundCategory.BLOCKS, 0.7f, 0.7f, false); + world.checkLight(pos); + return true; + } + + }else{ + + ((TileEntityReceptacle)tileEntity).setElement(null); + + ItemStack dust = new ItemStack(WizardryItems.spectral_dust, 1, currentElement.ordinal()); + + if(stack.isEmpty()){ + player.setHeldItem(hand, dust); + }else if(!player.addItemStackToInventory(dust)){ + player.dropItem(dust, false); + } + + world.checkLight(pos); + return true; + } + } + + return super.onBlockActivated(world, pos, state, player, hand, facing, hitX, hitY, hitZ); + } + + @Override + public void randomDisplayTick(IBlockState state, World world, BlockPos pos, Random rand){ + + TileEntity tileEntity = world.getTileEntity(pos); + + if(tileEntity instanceof TileEntityReceptacle){ + + Element element = ((TileEntityReceptacle)tileEntity).getElement(); + + if(element != null){ + + EnumFacing facing = state.getValue(FACING).getOpposite(); + + Vec3d centre = WizardryUtilities.getCentre(pos); + if(facing.getAxis().isHorizontal()){ + centre = centre.add(new Vec3d(facing.getDirectionVec()).scale(WALL_PARTICLE_OFFSET)).add(0, 0.125, 0); + } + + int[] colours = PARTICLE_COLOURS.get(element); + + ParticleBuilder.create(ParticleBuilder.Type.FLASH).pos(centre).scale(0.35f).time(48).clr(colours[0]).spawn(world); + + double r = 0.12; + + for(int i = 0; i < 3; i++){ + + double x = r * (rand.nextDouble() * 2 - 1); + double y = r * (rand.nextDouble() * 2 - 1); + double z = r * (rand.nextDouble() * 2 - 1); + + ParticleBuilder.create(ParticleBuilder.Type.DUST).pos(centre.x + x, centre.y + y, centre.z + z) + .vel(x * -0.03, 0.02, z * -0.03).time(24 + rand.nextInt(8)).clr(colours[1]).fade(colours[2]).spawn(world); + } + } + } + } + + @Nullable + @Override + public TileEntity createNewTileEntity(World world, int meta){ + return new TileEntityReceptacle(); + } + +} diff --git a/src/main/java/electroblob/wizardry/client/model/WizardryModels.java b/src/main/java/electroblob/wizardry/client/model/WizardryModels.java index 5dc88bc8..84a3aa9f 100644 --- a/src/main/java/electroblob/wizardry/client/model/WizardryModels.java +++ b/src/main/java/electroblob/wizardry/client/model/WizardryModels.java @@ -7,23 +7,20 @@ import electroblob.wizardry.block.BlockRunestone; import electroblob.wizardry.item.IMultiTexturedItem; import electroblob.wizardry.item.ItemBlockMultiTextured; import electroblob.wizardry.item.ItemCrystal; +import electroblob.wizardry.item.ItemSpectralDust; import electroblob.wizardry.registry.WizardryBlocks; import electroblob.wizardry.registry.WizardryItems; import net.minecraft.block.BlockPlanks; -import net.minecraft.block.state.IBlockState; import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.block.model.ModelBakery; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.block.statemap.StateMap; -import net.minecraft.client.renderer.block.statemap.StateMapperBase; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.ModelBakeEvent; import net.minecraftforge.client.event.ModelRegistryEvent; -import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.ModelLoaderRegistry; import net.minecraftforge.fml.common.Mod; @@ -91,6 +88,8 @@ public final class WizardryModels { registerItemModel(Item.getItemFromBlock(WizardryBlocks.acacia_lectern)); registerItemModel(Item.getItemFromBlock(WizardryBlocks.dark_oak_lectern)); + registerItemModel(Item.getItemFromBlock(WizardryBlocks.receptacle)); + // Items registerMultiTexturedModel((ItemCrystal)WizardryItems.magic_crystal); @@ -179,6 +178,8 @@ public final class WizardryModels { registerItemModel(WizardryItems.magic_silk); + registerMultiTexturedModel((ItemSpectralDust)WizardryItems.spectral_dust); + registerItemModel(WizardryItems.wizard_hat); registerItemModel(WizardryItems.wizard_robe); registerItemModel(WizardryItems.wizard_leggings); diff --git a/src/main/java/electroblob/wizardry/registry/WizardryBlocks.java b/src/main/java/electroblob/wizardry/registry/WizardryBlocks.java index 6bbccd46..b126b19c 100644 --- a/src/main/java/electroblob/wizardry/registry/WizardryBlocks.java +++ b/src/main/java/electroblob/wizardry/registry/WizardryBlocks.java @@ -4,8 +4,6 @@ import electroblob.wizardry.Wizardry; import electroblob.wizardry.block.*; import electroblob.wizardry.tileentity.*; import net.minecraft.block.Block; -import net.minecraft.block.BlockPlanks; -import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.util.ResourceLocation; import net.minecraftforge.event.RegistryEvent; @@ -77,6 +75,8 @@ public final class WizardryBlocks { public static final Block acacia_lectern = placeholder(); public static final Block dark_oak_lectern = placeholder(); + public static final Block receptacle = placeholder(); + /** * Sets both the registry and unlocalised names of the given block, then registers it with the given registry. Use * this instead of {@link Block#setRegistryName(String)} and {@link Block#setTranslationKey(String)} during @@ -134,6 +134,8 @@ public final class WizardryBlocks { registerBlock(registry, "acacia_lectern", new BlockLectern()); registerBlock(registry, "dark_oak_lectern", new BlockLectern()); + registerBlock(registry, "receptacle", new BlockReceptacle()); + } /** Called from the preInit method in the main mod class to register all the tile entities. */ @@ -148,5 +150,6 @@ public final class WizardryBlocks { GameRegistry.registerTileEntity(TileEntityShrineCore.class, new ResourceLocation(Wizardry.MODID, "shrine_core")); GameRegistry.registerTileEntity(TileEntityBookshelf.class, new ResourceLocation(Wizardry.MODID, "bookshelf")); GameRegistry.registerTileEntity(TileEntityLectern.class, new ResourceLocation(Wizardry.MODID, "lectern")); + GameRegistry.registerTileEntity(TileEntityReceptacle.class, new ResourceLocation(Wizardry.MODID, "receptacle")); } } \ No newline at end of file diff --git a/src/main/java/electroblob/wizardry/registry/WizardryItems.java b/src/main/java/electroblob/wizardry/registry/WizardryItems.java index bc998db7..a8e47661 100644 --- a/src/main/java/electroblob/wizardry/registry/WizardryItems.java +++ b/src/main/java/electroblob/wizardry/registry/WizardryItems.java @@ -416,6 +416,8 @@ public final class WizardryItems { registerItemBlock(registry, WizardryBlocks.acacia_lectern); registerItemBlock(registry, WizardryBlocks.dark_oak_lectern); + registerItemBlock(registry, WizardryBlocks.receptacle); + // Items registerItem(registry, "magic_crystal", new ItemCrystal()); diff --git a/src/main/java/electroblob/wizardry/registry/WizardrySounds.java b/src/main/java/electroblob/wizardry/registry/WizardrySounds.java index 95c01466..6b732c7b 100644 --- a/src/main/java/electroblob/wizardry/registry/WizardrySounds.java +++ b/src/main/java/electroblob/wizardry/registry/WizardrySounds.java @@ -29,6 +29,7 @@ public final class WizardrySounds { public static final SoundEvent BLOCK_PEDESTAL_ACTIVATE = createSound("block.pedestal.activate"); public static final SoundEvent BLOCK_PEDESTAL_CONQUER = createSound("block.pedestal.conquer"); public static final SoundEvent BLOCK_LECTERN_LOCATE_SPELL = createSound("block.lectern.locate_spell"); + public static final SoundEvent BLOCK_RECEPTACLE_IGNITE = createSound("block.receptacle.ignite"); public static final SoundEvent ITEM_WAND_SWITCH_SPELL = createSound("item.wand.switch_spell"); public static final SoundEvent ITEM_WAND_LEVELUP = createSound("item.wand.levelup"); @@ -156,6 +157,7 @@ public final class WizardrySounds { event.getRegistry().register(BLOCK_PEDESTAL_ACTIVATE); event.getRegistry().register(BLOCK_PEDESTAL_CONQUER); event.getRegistry().register(BLOCK_LECTERN_LOCATE_SPELL); + event.getRegistry().register(BLOCK_RECEPTACLE_IGNITE); event.getRegistry().register(ITEM_WAND_SWITCH_SPELL); event.getRegistry().register(ITEM_WAND_LEVELUP); diff --git a/src/main/java/electroblob/wizardry/tileentity/TileEntityReceptacle.java b/src/main/java/electroblob/wizardry/tileentity/TileEntityReceptacle.java new file mode 100644 index 00000000..064bfc9b --- /dev/null +++ b/src/main/java/electroblob/wizardry/tileentity/TileEntityReceptacle.java @@ -0,0 +1,61 @@ +package electroblob.wizardry.tileentity; + +import electroblob.wizardry.constants.Element; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.play.server.SPacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; + +import javax.annotation.Nullable; + +public class TileEntityReceptacle extends TileEntity { + + private Element element; + + public TileEntityReceptacle(){ + this(null); + } + + public TileEntityReceptacle(Element element){ + this.element = element; + } + + public Element getElement(){ + return element; + } + + public void setElement(Element element){ + this.element = element; + } + + @Override + public NBTTagCompound writeToNBT(NBTTagCompound compound){ + super.writeToNBT(compound); + compound.setInteger("Element", element == null ? -1 : element.ordinal()); + return compound; + } + + @Override + public void readFromNBT(NBTTagCompound compound){ + super.readFromNBT(compound); + int i = compound.getInteger("Element"); + element = i == -1 ? null : Element.values()[i]; + } + + @Override + public NBTTagCompound getUpdateTag(){ + return this.writeToNBT(new NBTTagCompound()); + } + + @Nullable + @Override + public SPacketUpdateTileEntity getUpdatePacket(){ + return new SPacketUpdateTileEntity(pos, getBlockMetadata(), this.getUpdateTag()); + } + + @Override + public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt){ + readFromNBT(pkt.getNbtCompound()); + } + +} diff --git a/src/main/resources/assets/ebwizardry/blockstates/receptacle.json b/src/main/resources/assets/ebwizardry/blockstates/receptacle.json new file mode 100644 index 00000000..d272bf0a --- /dev/null +++ b/src/main/resources/assets/ebwizardry/blockstates/receptacle.json @@ -0,0 +1,9 @@ +{ + "variants": { + "facing=up": { "model": "ebwizardry:receptacle" }, + "facing=east": { "model": "ebwizardry:wall_receptacle", "y": 270 }, + "facing=south": { "model": "ebwizardry:wall_receptacle" }, + "facing=west": { "model": "ebwizardry:wall_receptacle", "y": 90 }, + "facing=north": { "model": "ebwizardry:wall_receptacle", "y": 180 } + } +} diff --git a/src/main/resources/assets/ebwizardry/lang/en_gb.lang b/src/main/resources/assets/ebwizardry/lang/en_gb.lang index 1cca607e..cee7452f 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_gb.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_gb.lang @@ -47,6 +47,8 @@ tile.ebwizardry\:jungle_lectern.name=Jungle Lectern tile.ebwizardry\:acacia_lectern.name=Acacia Lectern tile.ebwizardry\:dark_oak_lectern.name=Dark Oak Lectern +tile.ebwizardry\:receptacle.name=Receptacle + item.ebwizardry\:crystal_magic.name=Magic Crystal item.ebwizardry\:crystal_magic.desc=The iridescent colours of this crystal seem to slowly shift and swirl, hinting at a magical energy within. Perhaps this magic could be harnessed in some way? item.ebwizardry\:crystal_fire.name=Fiery Crystal diff --git a/src/main/resources/assets/ebwizardry/lang/en_us.lang b/src/main/resources/assets/ebwizardry/lang/en_us.lang index 66fafa64..f3e9bde0 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_us.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_us.lang @@ -47,6 +47,8 @@ tile.ebwizardry\:jungle_lectern.name=Jungle Lectern tile.ebwizardry\:acacia_lectern.name=Acacia Lectern tile.ebwizardry\:dark_oak_lectern.name=Dark Oak Lectern +tile.ebwizardry\:receptacle.name=Receptacle + item.ebwizardry\:crystal_magic.name=Magic Crystal item.ebwizardry\:crystal_magic.desc=The iridescent colors of this crystal seem to slowly shift and swirl, hinting at a magical energy within. Perhaps this magic could be harnessed, somehow... item.ebwizardry\:crystal_fire.name=Fiery Crystal diff --git a/src/main/resources/assets/ebwizardry/models/block/receptacle.json b/src/main/resources/assets/ebwizardry/models/block/receptacle.json new file mode 100644 index 00000000..b64a8d89 --- /dev/null +++ b/src/main/resources/assets/ebwizardry/models/block/receptacle.json @@ -0,0 +1,262 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "ebwizardry:blocks/receptacle", + "particle": "ebwizardry:blocks/receptacle" + }, + "elements": [ + { + "from": [6, 6.5, 10], + "to": [10, 7.5, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 6.5, 12]}, + "faces": { + "north": {"uv": [1, 5, 5, 6], "texture": "#0"}, + "east": {"uv": [4, 5, 5, 6], "texture": "#0"}, + "south": {"uv": [1, 5, 5, 6], "texture": "#0"}, + "west": {"uv": [1, 5, 2, 6], "texture": "#0"}, + "up": {"uv": [1, 5, 5, 6], "texture": "#0"}, + "down": {"uv": [1, 5, 5, 6], "texture": "#0"} + } + }, + { + "from": [6, 5.5, 6], + "to": [10, 6.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 6.5, 8]}, + "faces": { + "north": {"uv": [1, 7, 5, 8], "texture": "#0"}, + "east": {"uv": [1, 7, 5, 8], "texture": "#0"}, + "south": {"uv": [1, 7, 5, 8], "texture": "#0"}, + "west": {"uv": [1, 7, 5, 8], "texture": "#0"}, + "up": {"uv": [1, 1, 5, 5], "texture": "#0"}, + "down": {"uv": [1, 1, 5, 5], "texture": "#0"} + } + }, + { + "from": [5, 6.5, 6], + "to": [6, 7.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 6.5, 8]}, + "faces": { + "north": {"uv": [0, 1, 1, 2], "texture": "#0"}, + "east": {"uv": [0, 1, 1, 5], "rotation": 90, "texture": "#0"}, + "south": {"uv": [0, 4, 1, 5], "texture": "#0"}, + "west": {"uv": [0, 1, 1, 5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [0, 1, 1, 5], "texture": "#0"}, + "down": {"uv": [0, 1, 1, 5], "texture": "#0"} + } + }, + { + "from": [6, 6.5, 5], + "to": [10, 7.5, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 6.5, 7]}, + "faces": { + "north": {"uv": [1, 0, 5, 1], "texture": "#0"}, + "east": {"uv": [4, 0, 5, 1], "texture": "#0"}, + "south": {"uv": [1, 0, 5, 1], "texture": "#0"}, + "west": {"uv": [1, 0, 2, 1], "texture": "#0"}, + "up": {"uv": [1, 0, 5, 1], "texture": "#0"}, + "down": {"uv": [1, 0, 5, 1], "texture": "#0"} + } + }, + { + "from": [10, 6.5, 6], + "to": [11, 7.5, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 6.5, 8]}, + "faces": { + "north": {"uv": [5, 1, 6, 2], "texture": "#0"}, + "east": {"uv": [5, 1, 6, 5], "rotation": 90, "texture": "#0"}, + "south": {"uv": [5, 4, 6, 5], "texture": "#0"}, + "west": {"uv": [5, 1, 6, 5], "rotation": 90, "texture": "#0"}, + "up": {"uv": [5, 1, 6, 5], "texture": "#0"}, + "down": {"uv": [5, 1, 6, 5], "texture": "#0"} + } + }, + { + "from": [10, 2.5, 7.5], + "to": [11, 6.5, 8.5], + "rotation": {"angle": -45, "axis": "z", "origin": [11, 5, 8]}, + "faces": { + "north": {"uv": [15, 1, 16, 5], "texture": "#0"}, + "east": {"uv": [14, 1, 15, 5], "texture": "#0"}, + "south": {"uv": [13, 1, 14, 5], "texture": "#0"}, + "west": {"uv": [12, 1, 13, 5], "texture": "#0"}, + "down": {"uv": [13, 4, 14, 5], "texture": "#0"} + } + }, + { + "from": [11.06066, 6.06066, 7.5], + "to": [12.06066, 8.06066, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19.06066, 15.06066, 16]}, + "faces": { + "north": {"uv": [15, 0, 16, 2], "texture": "#0"}, + "east": {"uv": [14, 0, 15, 2], "texture": "#0"}, + "south": {"uv": [13, 0, 14, 2], "texture": "#0"}, + "west": {"uv": [12, 0, 13, 2], "texture": "#0"}, + "up": {"uv": [13, 0, 14, 1], "texture": "#0"} + } + }, + { + "from": [7.5, 2.5, 5], + "to": [8.5, 6.5, 6], + "rotation": {"angle": -45, "axis": "x", "origin": [8, 5, 5]}, + "faces": { + "north": {"uv": [14, 1, 15, 5], "texture": "#0"}, + "east": {"uv": [13, 1, 14, 5], "texture": "#0"}, + "south": {"uv": [12, 1, 13, 5], "texture": "#0"}, + "west": {"uv": [15, 1, 16, 5], "texture": "#0"}, + "down": {"uv": [13, 4, 14, 5], "rotation": 90, "texture": "#0"} + } + }, + { + "from": [7.5, 6.06066, 3.93934], + "to": [8.5, 8.06066, 4.93934], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 15.06066, -3.06066]}, + "faces": { + "north": {"uv": [14, 0, 15, 2], "texture": "#0"}, + "east": {"uv": [13, 0, 14, 2], "texture": "#0"}, + "south": {"uv": [12, 0, 13, 2], "texture": "#0"}, + "west": {"uv": [15, 0, 16, 2], "texture": "#0"}, + "up": {"uv": [13, 0, 14, 1], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [5, 2.5, 7.5], + "to": [6, 6.5, 8.5], + "rotation": {"angle": 45, "axis": "z", "origin": [5, 5, 8]}, + "faces": { + "north": {"uv": [13, 1, 14, 5], "texture": "#0"}, + "east": {"uv": [12, 1, 13, 5], "texture": "#0"}, + "south": {"uv": [15, 1, 16, 5], "texture": "#0"}, + "west": {"uv": [14, 1, 15, 5], "texture": "#0"}, + "down": {"uv": [13, 4, 14, 5], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [3.93934, 6.06066, 7.5], + "to": [4.93934, 8.06066, 8.5], + "rotation": {"angle": 0, "axis": "y", "origin": [-3.06066, 15.06066, 0]}, + "faces": { + "north": {"uv": [13, 0, 14, 2], "texture": "#0"}, + "east": {"uv": [12, 0, 13, 2], "texture": "#0"}, + "south": {"uv": [15, 0, 16, 2], "texture": "#0"}, + "west": {"uv": [14, 0, 15, 2], "texture": "#0"}, + "up": {"uv": [13, 0, 14, 1], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [7.5, 2.5, 10], + "to": [8.5, 6.5, 11], + "rotation": {"angle": 45, "axis": "x", "origin": [8, 5, 11]}, + "faces": { + "north": {"uv": [12, 1, 13, 5], "texture": "#0"}, + "east": {"uv": [15, 1, 16, 5], "texture": "#0"}, + "south": {"uv": [14, 1, 15, 5], "texture": "#0"}, + "west": {"uv": [13, 1, 14, 5], "texture": "#0"}, + "down": {"uv": [13, 4, 14, 5], "rotation": 270, "texture": "#0"} + } + }, + { + "from": [7.5, 6.06066, 11.06066], + "to": [8.5, 8.06066, 12.06066], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 15.06066, 19.06066]}, + "faces": { + "north": {"uv": [12, 0, 13, 2], "texture": "#0"}, + "east": {"uv": [15, 0, 16, 2], "texture": "#0"}, + "south": {"uv": [14, 0, 15, 2], "texture": "#0"}, + "west": {"uv": [13, 0, 14, 2], "texture": "#0"}, + "up": {"uv": [13, 0, 14, 1], "rotation": 90, "texture": "#0"} + } + }, + { + "name": "connector", + "from": [6.5, 3, 6.5], + "to": [9.5, 4, 9.5], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 11, 17]}, + "faces": { + "north": {"uv": [7, 3, 10, 4], "texture": "#0"}, + "east": {"uv": [7, 3, 10, 4], "texture": "#0"}, + "south": {"uv": [7, 3, 10, 4], "texture": "#0"}, + "west": {"uv": [7, 3, 10, 4], "texture": "#0"}, + "up": {"uv": [7, 0, 10, 3], "texture": "#0"}, + "down": {"uv": [7, 0, 10, 3], "texture": "#0"} + } + }, + { + "name": "pillar", + "from": [7, 1, 7], + "to": [9, 3, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 9.5, 15]}, + "faces": { + "north": {"uv": [5, 9, 7, 11], "texture": "#0"}, + "east": {"uv": [5, 9, 7, 11], "texture": "#0"}, + "south": {"uv": [5, 9, 7, 11], "texture": "#0"}, + "west": {"uv": [5, 9, 7, 11], "texture": "#0"} + } + }, + { + "name": "base", + "from": [6, 0, 6], + "to": [10, 1, 10], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 8, 17]}, + "faces": { + "north": {"uv": [4, 11, 8, 12], "texture": "#0"}, + "east": {"uv": [4, 11, 8, 12], "texture": "#0"}, + "south": {"uv": [4, 11, 8, 12], "texture": "#0"}, + "west": {"uv": [4, 11, 8, 12], "texture": "#0"}, + "up": {"uv": [0, 8, 4, 12], "texture": "#0"}, + "down": {"uv": [0, 12, 4, 16], "texture": "#0", "cullface": "down"} + } + } + ], + "display": { + "thirdperson_righthand": { + "translation": [0.25, 3.5, 0] + }, + "thirdperson_lefthand": { + "translation": [0.25, 3.5, 0] + }, + "firstperson_righthand": { + "translation": [0.25, 3.5, 0] + }, + "firstperson_lefthand": { + "translation": [0.25, 3.5, 0] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.75, 0.75, 0.75] + }, + "gui": { + "rotation": [30, 225, 0], + "translation": [0, 3, 0] + }, + "fixed": { + "translation": [0.25, 3.5, 0] + } + }, + "groups": [ + { + "name": "dish", + "origin": [13, 8, 8], + "children": [0, 1, 2, 3, 4] + }, + { + "name": "arm", + "origin": [19.06066, 16.56066, 16], + "children": [5, 6] + }, + { + "name": "arm", + "origin": [19.06066, 16.56066, 16], + "children": [7, 8] + }, + { + "name": "arm", + "origin": [19.06066, 16.56066, 16], + "children": [9, 10] + }, + { + "name": "arm", + "origin": [19.06066, 16.56066, 16], + "children": [11, 12] + }, 13, 14, 15] +} \ No newline at end of file diff --git a/src/main/resources/assets/ebwizardry/models/block/wall_receptacle.json b/src/main/resources/assets/ebwizardry/models/block/wall_receptacle.json new file mode 100644 index 00000000..d378d412 --- /dev/null +++ b/src/main/resources/assets/ebwizardry/models/block/wall_receptacle.json @@ -0,0 +1,238 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "particle": "ebwizardry:blocks/wall_receptacle", + "main": "ebwizardry:blocks/wall_receptacle" + }, + "elements": [ + { + "from": [6, 8.5, 7], + "to": [10, 9.5, 8], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 8.5, 9]}, + "faces": { + "north": {"uv": [1, 5, 5, 6], "texture": "#main"}, + "east": {"uv": [4, 5, 5, 6], "texture": "#main"}, + "south": {"uv": [1, 5, 5, 6], "texture": "#main"}, + "west": {"uv": [1, 5, 2, 6], "texture": "#main"}, + "up": {"uv": [1, 5, 5, 6], "texture": "#main"}, + "down": {"uv": [1, 5, 5, 6], "texture": "#main"} + } + }, + { + "from": [6, 7.5, 3], + "to": [10, 8.5, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8.5, 5]}, + "faces": { + "north": {"uv": [1, 7, 5, 8], "texture": "#main"}, + "east": {"uv": [1, 7, 5, 8], "texture": "#main"}, + "south": {"uv": [1, 7, 5, 8], "texture": "#main"}, + "west": {"uv": [1, 7, 5, 8], "texture": "#main"}, + "up": {"uv": [1, 1, 5, 5], "texture": "#main"}, + "down": {"uv": [1, 1, 5, 5], "texture": "#main"} + } + }, + { + "from": [5, 8.5, 3], + "to": [6, 9.5, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8.5, 5]}, + "faces": { + "north": {"uv": [0, 1, 1, 2], "texture": "#main"}, + "east": {"uv": [0, 1, 1, 5], "rotation": 90, "texture": "#main"}, + "south": {"uv": [0, 4, 1, 5], "texture": "#main"}, + "west": {"uv": [0, 1, 1, 5], "rotation": 90, "texture": "#main"}, + "up": {"uv": [0, 1, 1, 5], "texture": "#main"}, + "down": {"uv": [0, 1, 1, 5], "texture": "#main"} + } + }, + { + "from": [6, 8.5, 2], + "to": [10, 9.5, 3], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 8.5, 4]}, + "faces": { + "north": {"uv": [1, 0, 5, 1], "texture": "#main"}, + "east": {"uv": [4, 0, 5, 1], "texture": "#main"}, + "south": {"uv": [1, 0, 5, 1], "texture": "#main"}, + "west": {"uv": [1, 0, 2, 1], "texture": "#main"}, + "up": {"uv": [1, 0, 5, 1], "texture": "#main"}, + "down": {"uv": [1, 0, 5, 1], "texture": "#main"} + } + }, + { + "from": [10, 8.5, 3], + "to": [11, 9.5, 7], + "rotation": {"angle": 0, "axis": "y", "origin": [13, 8.5, 5]}, + "faces": { + "north": {"uv": [5, 1, 6, 2], "texture": "#main"}, + "east": {"uv": [5, 1, 6, 5], "rotation": 90, "texture": "#main"}, + "south": {"uv": [5, 4, 6, 5], "texture": "#main"}, + "west": {"uv": [5, 1, 6, 5], "rotation": 90, "texture": "#main"}, + "up": {"uv": [5, 1, 6, 5], "texture": "#main"}, + "down": {"uv": [5, 1, 6, 5], "texture": "#main"} + } + }, + { + "from": [10, 4.5, 4.5], + "to": [11, 8.5, 5.5], + "rotation": {"angle": -45, "axis": "z", "origin": [11, 7, 5]}, + "faces": { + "north": {"uv": [15, 1, 16, 5], "texture": "#main"}, + "east": {"uv": [14, 1, 15, 5], "texture": "#main"}, + "south": {"uv": [13, 1, 14, 5], "texture": "#main"}, + "west": {"uv": [12, 1, 13, 5], "texture": "#main"}, + "down": {"uv": [13, 4, 14, 5], "texture": "#main"} + } + }, + { + "from": [11.06066, 8.06066, 4.5], + "to": [12.06066, 10.06066, 5.5], + "rotation": {"angle": 0, "axis": "y", "origin": [19.06066, 17.06066, 13]}, + "faces": { + "north": {"uv": [15, 0, 16, 2], "texture": "#main"}, + "east": {"uv": [14, 0, 15, 2], "texture": "#main"}, + "south": {"uv": [13, 0, 14, 2], "texture": "#main"}, + "west": {"uv": [12, 0, 13, 2], "texture": "#main"}, + "up": {"uv": [13, 0, 14, 1], "texture": "#main"} + } + }, + { + "from": [7.5, 4.5, 2], + "to": [8.5, 8.5, 3], + "rotation": {"angle": -45, "axis": "x", "origin": [8, 7, 2]}, + "faces": { + "north": {"uv": [14, 1, 15, 5], "texture": "#main"}, + "east": {"uv": [13, 1, 14, 5], "texture": "#main"}, + "south": {"uv": [12, 1, 13, 5], "texture": "#main"}, + "west": {"uv": [15, 1, 16, 5], "texture": "#main"}, + "down": {"uv": [13, 4, 14, 5], "rotation": 90, "texture": "#main"} + } + }, + { + "from": [7.5, 8.06066, 0.93934], + "to": [8.5, 10.06066, 1.93934], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 17.06066, -6.06066]}, + "faces": { + "north": {"uv": [14, 0, 15, 2], "texture": "#main"}, + "east": {"uv": [13, 0, 14, 2], "texture": "#main"}, + "south": {"uv": [12, 0, 13, 2], "texture": "#main"}, + "west": {"uv": [15, 0, 16, 2], "texture": "#main"}, + "up": {"uv": [13, 0, 14, 1], "rotation": 270, "texture": "#main"} + } + }, + { + "from": [5, 4.5, 4.5], + "to": [6, 8.5, 5.5], + "rotation": {"angle": 45, "axis": "z", "origin": [5, 7, 5]}, + "faces": { + "north": {"uv": [13, 1, 14, 5], "texture": "#main"}, + "east": {"uv": [12, 1, 13, 5], "texture": "#main"}, + "south": {"uv": [15, 1, 16, 5], "texture": "#main"}, + "west": {"uv": [14, 1, 15, 5], "texture": "#main"}, + "down": {"uv": [13, 4, 14, 5], "rotation": 180, "texture": "#main"} + } + }, + { + "from": [3.93934, 8.06066, 4.5], + "to": [4.93934, 10.06066, 5.5], + "rotation": {"angle": 0, "axis": "y", "origin": [-3.06066, 17.06066, -3]}, + "faces": { + "north": {"uv": [13, 0, 14, 2], "texture": "#main"}, + "east": {"uv": [12, 0, 13, 2], "texture": "#main"}, + "south": {"uv": [15, 0, 16, 2], "texture": "#main"}, + "west": {"uv": [14, 0, 15, 2], "texture": "#main"}, + "up": {"uv": [13, 0, 14, 1], "rotation": 180, "texture": "#main"} + } + }, + { + "from": [7.5, 4.5, 7], + "to": [8.5, 8.5, 8], + "rotation": {"angle": 45, "axis": "x", "origin": [8, 7, 8]}, + "faces": { + "north": {"uv": [12, 1, 13, 5], "texture": "#main"}, + "east": {"uv": [15, 1, 16, 5], "texture": "#main"}, + "south": {"uv": [14, 1, 15, 5], "texture": "#main"}, + "west": {"uv": [13, 1, 14, 5], "texture": "#main"}, + "down": {"uv": [13, 4, 14, 5], "rotation": 270, "texture": "#main"} + } + }, + { + "from": [7.5, 8.06066, 8.06066], + "to": [8.5, 10.06066, 9.06066], + "rotation": {"angle": 0, "axis": "y", "origin": [0, 17.06066, 16.06066]}, + "faces": { + "north": {"uv": [12, 0, 13, 2], "texture": "#main"}, + "east": {"uv": [15, 0, 16, 2], "texture": "#main"}, + "south": {"uv": [14, 0, 15, 2], "texture": "#main"}, + "west": {"uv": [13, 0, 14, 2], "texture": "#main"}, + "up": {"uv": [13, 0, 14, 1], "rotation": 90, "texture": "#main"} + } + }, + { + "name": "connector", + "from": [6.5, 5, 3.5], + "to": [9.5, 6, 6.5], + "rotation": {"angle": 0, "axis": "y", "origin": [14, 13, 14]}, + "faces": { + "north": {"uv": [7, 3, 10, 4], "texture": "#main"}, + "east": {"uv": [7, 3, 10, 4], "texture": "#main"}, + "south": {"uv": [7, 3, 10, 4], "texture": "#main"}, + "west": {"uv": [7, 3, 10, 4], "texture": "#main"}, + "up": {"uv": [7, 0, 10, 3], "texture": "#main"}, + "down": {"uv": [7, 0, 10, 3], "texture": "#main"} + } + }, + { + "name": "pillar", + "from": [7, 3, 1], + "to": [9, 5, 6], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 11.5, 15]}, + "faces": { + "east": {"uv": [10, 10, 5, 12], "texture": "#main"}, + "south": {"uv": [10, 10, 12, 12], "texture": "#main"}, + "west": {"uv": [5, 10, 10, 12], "texture": "#main"}, + "up": {"uv": [10, 10, 5, 12], "rotation": 270, "texture": "#main"}, + "down": {"uv": [5, 10, 10, 12], "rotation": 270, "texture": "#main"} + } + }, + { + "name": "base", + "from": [6, 2, 0], + "to": [10, 6, 1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 4.5, 1]}, + "faces": { + "north": {"uv": [0, 9, 4, 13], "texture": "#main", "cullface": "north"}, + "east": {"uv": [4, 9, 5, 13], "texture": "#main"}, + "south": {"uv": [0, 9, 4, 13], "texture": "#main"}, + "west": {"uv": [4, 9, 5, 13], "texture": "#main"}, + "up": {"uv": [0, 8, 4, 9], "texture": "#main"}, + "down": {"uv": [0, 13, 4, 14], "texture": "#main"} + } + } + ], + "groups": [ + { + "name": "dish", + "origin": [13, 8, 8], + "children": [0, 1, 2, 3, 4] + }, + { + "name": "arm", + "origin": [19.06066, 16.56066, 16], + "children": [5, 6] + }, + { + "name": "arm", + "origin": [19.06066, 16.56066, 16], + "children": [7, 8] + }, + { + "name": "arm", + "origin": [19.06066, 16.56066, 16], + "children": [9, 10] + }, + { + "name": "arm", + "origin": [19.06066, 16.56066, 16], + "children": [11, 12] + }, 13, 14, 15] +} \ No newline at end of file diff --git a/src/main/resources/assets/ebwizardry/models/item/receptacle.json b/src/main/resources/assets/ebwizardry/models/item/receptacle.json new file mode 100644 index 00000000..6d9b51f0 --- /dev/null +++ b/src/main/resources/assets/ebwizardry/models/item/receptacle.json @@ -0,0 +1,3 @@ +{ + "parent": "ebwizardry:block/receptacle" +} diff --git a/src/main/resources/assets/ebwizardry/sounds.json b/src/main/resources/assets/ebwizardry/sounds.json index 975ef6c1..4ff79637 100644 --- a/src/main/resources/assets/ebwizardry/sounds.json +++ b/src/main/resources/assets/ebwizardry/sounds.json @@ -3,6 +3,7 @@ "block.pedestal.activate": {"category": "blocks", "sounds": ["mob/evocation_illager/prepare_summon"]}, "block.pedestal.conquer": {"category": "blocks", "sounds": ["ui/toast/challenge_complete"]}, "block.lectern.locate_spell": {"category": "blocks", "sounds": ["ebwizardry:conjure"]}, + "block.receptacle.ignite": {"category": "blocks", "sounds": ["mob/evocation_illager/cast1", "mob/evocation_illager/cast2"]}, "item.wand.switch_spell": {"category": "player", "sounds": ["ebwizardry:select"]}, "item.wand.levelup": {"category": "player", "sounds": ["random/levelup"]}, diff --git a/src/main/resources/assets/ebwizardry/textures/blocks/receptacle.png b/src/main/resources/assets/ebwizardry/textures/blocks/receptacle.png new file mode 100644 index 00000000..300eadb5 Binary files /dev/null and b/src/main/resources/assets/ebwizardry/textures/blocks/receptacle.png differ diff --git a/src/main/resources/assets/ebwizardry/textures/blocks/wall_receptacle.png b/src/main/resources/assets/ebwizardry/textures/blocks/wall_receptacle.png new file mode 100644 index 00000000..bbae2f2d Binary files /dev/null and b/src/main/resources/assets/ebwizardry/textures/blocks/wall_receptacle.png differ