Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/02/17 in all areas

  1. I am trying to make a mod with rifts, which are vaguely like Thaumcraft's aura nodes. One block which will interact with the rifts is a destabilizer, which will allow multiblock-like crafting. This block should draw a sphere of particles above itself when powered, but when it is unpowered, just a tiny ball at the center, and drop some items, depending on the area around it. Currently, I am testing this with the fire particle when unpowered. Any code that is commented out I have tried both with and without in every combination. No particles are displayed. package zane49er.VolkiharEchoes.features; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class Destabilizer extends Block { public Destabilizer(String registryName) { super(Material.PISTON); setRegistryName(registryName); setUnlocalizedName(getRegistryName().toString()); setHardness(3.0f); } //@Override @SideOnly(Side.CLIENT) public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) { //if(!worldIn.isBlockPowered(pos)){ worldIn.spawnParticle(EnumParticleTypes.FLAME, (double)pos.getX(), (double)pos.getY()+5, (double)pos.getZ(), 0, 0, 0, new int[0]); //} } //@Override @SideOnly(Side.CLIENT) public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand) { //if(!worldIn.isBlockPowered(pos)){ worldIn.spawnParticle(EnumParticleTypes.FLAME, (double)pos.getX(), (double)pos.getY()+5, (double)pos.getZ(), 0, 0, 0, new int[0]); //} } } It seems that the randomDisplayTick is never being called. Also, I want to make the (fullbright) rifts change color based on their contents, but that's a future problem... Finally, creative tabs are not being created, and I don't understand why.
    1 point
  2. That if-statement will never be true, you're comparing an Item with an ItemStack which are completely different types.
    1 point
  3. Hi was trying to install forge but keeps on crashing can someone please help me. forge-1.12-14.21.0.2331-installer.jar.log
    1 point
  4. Delete the libraries folder and try installing again.
    1 point
  5. The creative tab and particles are working on my machine:
    1 point
  6. https://github.com/zane49er2/Volkihar-for-MineCraft-Mod Sorry this is so confusing on GitHub, this project folder includes previous versions so that I can pull models, textures, or planning from them,
    1 point
  7. I'm not seeing any obvious issues that would stop the particles from working. Create a Git repository for your mod, push it to a site like GitHub (if you haven't already) and link it here; I'll need to debug this locally to locate the issue. I did notice that you have model registration code in a common class, which has the potential to crash the dedicated server. Model registration should be done in a dedicated client-only class. I also recommend moving your Block/Item registration to the corresponding registry events and your model registration to ModelRegistryEvent. This will make it easier to update to 1.12+, where GameRegistry.register is private.
    1 point
  8. Any Item that has subtypes (i.e. Item#getHasSubtypes returns true) requires the metadata to be specified with the data property when used in JSON recipes. I explained this here. ItemMeshDefinitions are registered with ModelLoader.setCustomMeshDefinition, just as before.
    1 point
  9. package zane49er.VolkiharEchoes.init; import net.minecraft.block.Block; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.registry.GameRegistry; import zane49er.VolkiharEchoes.features.Destabilizer; import zane49er.VolkiharEchoes.features.Rift; import zane49er.VolkiharEchoes.features.Stabilizer; import zane49er.VolkiharEchoes.main.References; public class ModBlocks { public static Block destabilizer; public static void init() { destabilizer = new Destabilizer("destabilizer"); } public static void register() { registerBlock(destabilizer); } private static void registerBlock(Block block) { GameRegistry.register(block); ItemBlock item = new ItemBlock (block); item.setRegistryName(block.getRegistryName()); GameRegistry.register(item); } public static void registerRenders() { registerRender(destabilizer); } public static void registerRender(Block block) { //Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(References.MODID + ":" + item.getUnlocalizedName().substring(5),"inventory")); //ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(new ResourceLocation(References.MODID, block.getUnlocalizedName().substring(5)), "inventory")); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory")); } } Unless I have to initialize the updatetick separately, I don't know how I could mess that up. The block Is working fine, it just won't make particles. I also recently tried literally copy + pasting the code from torches, still no result. package zane49er.VolkiharEchoes.features; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import zane49er.VolkiharEchoes.init.ModItems; public class ModTabUseful extends CreativeTabs{ public ModTabUseful(String name) { super("TabUseful"); } @Override public Item getTabIconItem() { return ModItems.riftReader; } } package zane49er.VolkiharEchoes.init; import net.minecraft.block.Block; import net.minecraft.creativetab.CreativeTabs; import zane49er.VolkiharEchoes.features.ModTabUseful; public class ModTabs { public static CreativeTabs useful; public static void init() { useful = new ModTabUseful("TabUseful"); } } This one has been giving me trouble since 1.7.
    1 point
  10. It's possible to create clients, {not legal in quite a lot of ways} But it's impossible to stop cheating on the client's side. I am not gunna download and run your random code on my machine. Oh wow, and reading the page you're offering the pirated version of Minecraft to your users. You REALLY are bad at this. No, No help for you!
    1 point
  11. Are you definitely registering an instance of this class? Post your registration code and the class that calls it. Also post the code where you create your creative tabs.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.