Jump to content

sarydactl

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by sarydactl

  1. Make sure your metamc file is not a txt file. When you go to properties it should NOT tell you txt. Even if you save it properly, it will still convert it to txt, so be sure to go back and convert it yourself. Other than that, I believe animations require 32 frames, but I might be wrong. Beyond that, I think the code is only pulling a texture, but won't update a texture. Consider using another Event to control it/tick it and see how far you get there.
  2. Yep, it's me again v vv . I finally figured out what the TickHandler/EventHandler could be used for, so I've opted to use it as a last resort for this snow-melting business. However, I have no idea how to pull up world chunk information. package com.REMINISC3.chronocube; import java.util.HashSet; import java.util.Iterator; import java.util.Random; import java.util.Set; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Blocks; import net.minecraft.util.ChunkCoordinates; import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.WorldServer; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.Chunk; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.gameevent.TickEvent; import net.minecraft.entity.player.*; import cpw.mods.fml.common.gameevent.TickEvent.ServerTickEvent; import cpw.mods.fml.relauncher.SideOnly; public class Teferi { @SubscribeEvent public void onServerTick(ServerTickEvent event){ if (!(TimeKeeper.seasonreal()==4)){ int k = THISISCHUNKX * 16; int l = THISISCHUNKZ * 16; int i1; int j1; int updateLCG = (new Random()).nextInt(); int k1; int l1; updateLCG = updateLCG * 3 + 1013904223; i1 = updateLCG >> 2; j1 = i1 & 15; k1 = i1 >> 8 & 15; l1 = WorldServer.getPrecipitationHeight(j1 + k, k1 + l); if (WorldServer.isBlockFreezableNaturally(j1 + k, l1 - 1, k1 + l)) { WorldServer.setBlock(j1 + k, l1 - 1, k1 + l, Blocks.water); } if (WorldServer.isRaining()) {Block block = WorldServer.getBlock((j1+k), (l1-1), (k1+l)); if (block.getMaterial() == Material.snow) { WorldServer.setBlockToAir(j1 + k, l1 - 1, k1 + l); } } } } } THISISCHUNKX and THISISCHUNKZ is what I'm trying to replace. I've found ChunkCoordIntPair, but trying to retrieve stuff from there gives me errors. I'm not sure why =/ .
  3. Thanks much for responding! I think the most straightforward/convenient would actually be #3. However, I have a somewhat noobish question. Where would I call for the snow destruction code? Just from the main modclass, or...?
  4. I'm trying to make it so that the world both rains and snows in certain biomes. The only problem with this is that the snow doesn't disappear after the snow storms, making everything look like a taiga after it snows once. How do I make the snow block check conditions other than nearby light sources to see if it can decay? I'm looking through vanilla to see where the decay class is, but I can't find it for the life of me. EDIT1: Okay, I have this code going on: package com.REMINISC3.chronocube; import net.minecraft.block.Block; import net.minecraft.block.BlockSnow; import net.minecraft.init.Blocks; import net.minecraft.world.World; public class SnowMan extends BlockSnow { private boolean func_150155_m(World test, int i, int j, int k) { if (test.canLightningStrikeAt(i, j, k)) { test.setBlockToAir(i, j, k); return false; } else return true; } } The goal is that when it rains, snow slabs disappear. Unfortunately, it's being ignored. How do I tell the game to apply this to snow slabs? I am apparently unable to override anything in the base class.
  5. I'm trying to save the time that the server first starts/track the time since the server first started. Ticks won't do it, because they stop when the server is removed, and can be modified by setting the time. So how do I create my own seed, something that won't change every time the server is rebooted? I have a feeling that the game actually does have it in there somewhere (possibly long k in the dedicated server class?), but I need to keep it in a specific format (whatever the System.currentTimeMillis( ); returns). Plus, I can't use the seed if it's customized, it would throw everything off. BUT--in the event that this is a usable time, how on earth would I call it from my mod? Also, I'm aware that calling for the system time might screw things up if they change their computer time to before the start of the server. I already have a safeguard for that.
  6. Yep, that's exactly where it is. I went scrounging through the code to see if vine textures are called from some other folder, but no luck there. The other blocks that call for textures (in the same file, no less) can find their texture fine, but the vines just can't locate it. As for the item thing, yeah, I probably don't need it. I just realized what it was. The script that I used to export my textures made it 15 x 16. Thank you for your speedy assistance though, Nabosueco98~.
  7. I have a custom vine working perfectly fine. It grows and it doesn't crash the game. However, it can't find the texture for it. I've tried doing the vine two different ways (first, using vanilla code; second, using the much-easier-to-do forge stuff) but it can't locate the correct texture. I wonder if there's a different way I should be initializing it? How I Register It: public static Block trumpet; //(in pre-init) trumpet = new Trumpet().setBlockName("Trumpet").setBlockTextureName("chronocube:trumpet"); GameRegistry.registerBlock(trumpet, trumpet.getUnlocalizedName().substring(5)); My Custom Vine Class: package com.REMINISC3.chronocube; import net.minecraft.block.Block; import net.minecraft.block.BlockVine; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraftforge.common.IShearable; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; public class Trumpet extends BlockVine implements IShearable { public Trumpet() { this.setCreativeTab(Chronocube.tabMyMod); } @Override public void registerBlockIcons(IIconRegister iconRegister) { this.blockIcon = iconRegister.registerIcon("chronocube:trumpet"); } } It throws no errors and the other Blocks declared in the same way find their textures just fine. I'm a little baffled.
×
×
  • Create New...

Important Information

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