Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

HappyHippo77's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. Thanks for the help, sorry I keep asking so many questions. Where would I use this hashmap? In a class which extends WorldSavedData?
  2. I'm relatively new to Forge, so all of this is very complicated and out of my league, but I'm good at learning, so I'll try. Do you know of any resources for this kind of thing? Well, once the blocks "die", they'd probably be replaced with separate blocks from the mod which would have a more "dead" appearance, and no ability to receive energy (and may have lesser value drops), so I don't think I'd need that kind of thing too much (the energy will restore naturally over time, and not an overly long time, so it shouldn't ever get too full of data).
  3. Thanks for the response! So to do this, would I basically need to add a value for every modified block containing the location and energy values (and potentially the block type as well) of each block?
  4. So I've got a really cool idea for a system for a mod of mine. Basically, it's a magic mod, and there will be two kinda of energy (mana), natural and personal. Natural energy exists in every natural block in the game, to different extents depending on the block itself. Personal energy is from the player themselves. By depleting personal energy too far you'll begin to experience negative effects, but if you don't give an area enough time to "recharge" after performing more magic there and trying again, the energy might be completely depleted from the blocks and they might die, rendering the area useless. Thus, you'd have to balance between using personal and natural energy in order to keep your casting areas alive. I really want to implement this system, but I've run into a massive barrier. I don't know how I would be able to store information, not only in normal vanilla blocks, but in EVERY natural block which has been depleted from its default energy in some way.. I've seen other mods do things somewhat similar to this, so I get the feeling it's possible, I just have no idea how to do it myself. Would I use Capabilities? Or is there a better system?
  5. I might be able to figure it out in 1.15. I used 1.14 because the documentation sucks for 1.15, and there's no tutorials for it either. I'll see if I can update.
  6. Hey! Thanks for the reply. Took me a while to figure out, and I'm not sure I did it right, but I think I finally managed to make a repository for it: https://github.com/HappyHippo77/Witchery2 Please tell me if I did something wrong! I'm pretty new to github. I also may have changed some stuff in the files since I last replied. (Also: I am recreating the Witchery mod, yes. Mostly for practice and personal use, though I may publicize it if it ever gets accurate enough to the original. The idea is not to claim the work as my own, but to bring back the work of another person.)
  7. So I feel bad asking here, but I can't find anything anywhere else so I'll just ask... So I've pretty much done what's in here. The game loads with no related errors or warnings. But when I place the block down, it's completely invisible. It has a hitbox, but there's nothing there. I saw one other person with this problem but they were using 1.9 and never got a good answer. Any idea what causes this?
  8. I would do this, but IIRC they closed their suggestions and such. I also don't very much like it, because it doesn't have the same feel as the original Witchery mod.
  9. Thanks for the help! Also, regarding this ^, I figured that would be it, but I do wonder how that ties in to the fact that that mod is dead (and seemingly, so too is the creator). Who would be the one to call me out if I did reproduce it? I am copying the textures from the mod to use in the recreation, but I'm actively acknowledging that they are Emoniph's creation, not mine. Is there somewhere where I can look at the specifics behind the license and everything for Witchery?
  10. Thanks! This is pretty helpful! One thing though, how would one find which block is being clicked with the onItemUse?
  11. Hey again! I'm gonna be around here a lot for a while... So this time I'm trying to make it so when I right click a cauldron with an item, it changes to a different block. Relatively simple concept, with one small problem. I want this to happen to a VANILLA cauldron. Now I've tried to do this by extending CauldronBlock in a class and overriding the onBlockActivated event, but this doesn't seem to be working. I'm assuming there's a problem with the way I'm overriding the thing, but I'm not sure what the issue is. So... how do I do this?? Here's the code: package com.happyhippo77.witchery2.block.blocks; import com.happyhippo77.witchery2.item.ModItems; import net.minecraft.block.*; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.*; import net.minecraft.potion.PotionUtils; import net.minecraft.potion.Potions; import net.minecraft.stats.Stats; import net.minecraft.tileentity.BannerTileEntity; import net.minecraft.util.Hand; import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundEvents; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.world.World; public class MinecraftCauldron extends CauldronBlock { public MinecraftCauldron(Block.Properties properties) { super(properties); this.setDefaultState(this.stateContainer.getBaseState().with(LEVEL, Integer.valueOf(0))); } @Override public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { ItemStack itemstack = player.getHeldItem(handIn); if (itemstack.getItem() == ModItems.ANOINTING_PASTE) { // DO STUFF HERE } else { return true; } if (itemstack.isEmpty()) { return true; } else { int i = state.get(LEVEL); Item item = itemstack.getItem(); if (item == Items.WATER_BUCKET) { if (i < 3 && !worldIn.isRemote) { if (!player.abilities.isCreativeMode) { player.setHeldItem(handIn, new ItemStack(Items.BUCKET)); } player.addStat(Stats.FILL_CAULDRON); this.setWaterLevel(worldIn, pos, state, 3); worldIn.playSound((PlayerEntity)null, pos, SoundEvents.ITEM_BUCKET_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F); } return true; } else if (item == Items.BUCKET) { if (i == 3 && !worldIn.isRemote) { if (!player.abilities.isCreativeMode) { itemstack.shrink(1); if (itemstack.isEmpty()) { player.setHeldItem(handIn, new ItemStack(Items.WATER_BUCKET)); } else if (!player.inventory.addItemStackToInventory(new ItemStack(Items.WATER_BUCKET))) { player.dropItem(new ItemStack(Items.WATER_BUCKET), false); } } player.addStat(Stats.USE_CAULDRON); this.setWaterLevel(worldIn, pos, state, 0); worldIn.playSound((PlayerEntity)null, pos, SoundEvents.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); } return true; } else if (item == Items.GLASS_BOTTLE) { if (i > 0 && !worldIn.isRemote) { if (!player.abilities.isCreativeMode) { ItemStack itemstack4 = PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), Potions.WATER); player.addStat(Stats.USE_CAULDRON); itemstack.shrink(1); if (itemstack.isEmpty()) { player.setHeldItem(handIn, itemstack4); } else if (!player.inventory.addItemStackToInventory(itemstack4)) { player.dropItem(itemstack4, false); } else if (player instanceof ServerPlayerEntity) { ((ServerPlayerEntity)player).sendContainerToPlayer(player.container); } } worldIn.playSound((PlayerEntity)null, pos, SoundEvents.ITEM_BOTTLE_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); this.setWaterLevel(worldIn, pos, state, i - 1); } return true; } else if (item == Items.POTION && PotionUtils.getPotionFromItem(itemstack) == Potions.WATER) { if (i < 3 && !worldIn.isRemote) { if (!player.abilities.isCreativeMode) { ItemStack itemstack3 = new ItemStack(Items.GLASS_BOTTLE); player.addStat(Stats.USE_CAULDRON); player.setHeldItem(handIn, itemstack3); if (player instanceof ServerPlayerEntity) { ((ServerPlayerEntity)player).sendContainerToPlayer(player.container); } } worldIn.playSound((PlayerEntity)null, pos, SoundEvents.ITEM_BOTTLE_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F); this.setWaterLevel(worldIn, pos, state, i + 1); } return true; } else { if (i > 0 && item instanceof IDyeableArmorItem) { IDyeableArmorItem idyeablearmoritem = (IDyeableArmorItem)item; if (idyeablearmoritem.hasColor(itemstack) && !worldIn.isRemote) { idyeablearmoritem.removeColor(itemstack); this.setWaterLevel(worldIn, pos, state, i - 1); player.addStat(Stats.CLEAN_ARMOR); return true; } } if (i > 0 && item instanceof BannerItem) { if (BannerTileEntity.getPatterns(itemstack) > 0 && !worldIn.isRemote) { ItemStack itemstack2 = itemstack.copy(); itemstack2.setCount(1); BannerTileEntity.removeBannerData(itemstack2); player.addStat(Stats.CLEAN_BANNER); if (!player.abilities.isCreativeMode) { itemstack.shrink(1); this.setWaterLevel(worldIn, pos, state, i - 1); } if (itemstack.isEmpty()) { player.setHeldItem(handIn, itemstack2); } else if (!player.inventory.addItemStackToInventory(itemstack2)) { player.dropItem(itemstack2, false); } else if (player instanceof ServerPlayerEntity) { ((ServerPlayerEntity)player).sendContainerToPlayer(player.container); } } return true; } else if (i > 0 && item instanceof BlockItem) { Block block = ((BlockItem)item).getBlock(); if (block instanceof ShulkerBoxBlock && !worldIn.isRemote()) { ItemStack itemstack1 = new ItemStack(Blocks.SHULKER_BOX, 1); if (itemstack.hasTag()) { itemstack1.setTag(itemstack.getTag().copy()); } player.setHeldItem(handIn, itemstack1); this.setWaterLevel(worldIn, pos, state, i - 1); player.addStat(Stats.CLEAN_SHULKER_BOX); } return true; } else { return false; } } } } }
  12. Thanks! One problem though, I can get it down to "client" but there's no "extra". EDIT: well I didn't find "extra", but I did find "block" above "client" and I think it was in there.
  13. So I'm not really sure if this is legal or not, but I'm trying to recreate the Witchery mod for practice. I'm not modifying or using the source code, and I'm not claiming it as original work, plus it's been dead for years (and so has the creator apparently), so I don't think it will be a problem. Now, I've run into a massive difficulty. I'm trying to recreate the Witch's Cauldron, and I've noticed something about the model. The little feet have are rotated on multiple axis. I'm using BlockBench for the models, and in normal Java Minecraft, you can only rotate parts on one axis. Now, I figured I might open the Witchery Jar and just check how they do it in that. They don't. There's no models at all. So yeah, how do you make a model with parts with multiple rotations?
  14. I'm using IntelliJ, and I can't seem to find anything like this. Would it be in "External Libraries"? And if so what would the name in there be? I see nothing similar to "client-extra"...
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.