Jump to content

gurujive

Forge Modder
  • Posts

    375
  • Joined

  • Last visited

Everything posted by gurujive

  1. I would quite enjoy if at the bottom of every build.gradle there was: sourceCompatibility = # targetCompatibility = # for the java version that it is for instead of having to manually put it in there before running gradlew setupDecompWorkspace. It'd be nice though. Less hassle.
  2. If you execute Fallingsand in a motion of 0.1 upwards. And have it going along a complete flat plane. It will cause ghost blocks if you conjuction it with summoning another line in a different direction (or in some cases a different line, same direction, right next to eachother) I have an entity that flies straight with a fuse that i execute falling sand at. So, my goal was to make it go in a spiral around a center block, which would eventually spiral out into a platform on which building would fly down from the sky and land on. But, when the spiralling of fallingsand occurs the corners of where the falling sand should go is instead replaced with a ghost block. (one of those ones you cant go through and makes your screen jitter) Also, if erased and the spiralling repeated the ghost blocks may not occur in the same place as they did before. If fallingsand did not spawn ghost blocks randomly in the fashion I am using them it would be really cool. So, that's my suggestion. FallingSand no longer spawning ghost blocks.
  3. Yeah, I'm going to change this to solved. I got it goin'
  4. it makes it so when it hits a block it dies, but when it hits an entity it pierces through it.
  5. This is doing the same thing: I'm really disappointed. The entity disappears after going through the first entity it hits, to travel through and hit whats behind it. import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.SoundEvents; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.RayTraceResult; import net.minecraft.world.World; public class EntityEarthOrb extends EntityOrb2 { public EntityEarthOrb(World worldIn) { super(worldIn); } public EntityEarthOrb(World worldIn, EntityLivingBase throwerIn) { super(worldIn, throwerIn); } public void onUpdate() { super.onUpdate(); this.worldObj.spawnParticle(EnumParticleTypes.BLOCK_CRACK, posX + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) / 2, posY + (worldObj.rand.nextFloat() / -2 - worldObj.rand.nextFloat()) / -1.3, posZ + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) / 2, 0, 0, 0, new int[] {Block.getIdFromBlock(Blocks.DIRT)}); ++ticksExisted; if (this.ticksExisted >= 54) { this.setDead(); } } public EntityEarthOrb(World worldIn, double x, double y, double z) { super(worldIn, x, y, z); } protected void onImpact(RayTraceResult result) { if (result.entityHit != null) { int i = 0; if (result.entityHit instanceof EntityLivingBase) { i = 4; } result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)i); worldObj.playSound((EntityPlayer)null, posX, posY, posZ, SoundEvents.BLOCK_GRASS_BREAK, SoundCategory.NEUTRAL, 0.8F, 1.5F / (worldObj.rand.nextFloat() * 0.4F + 0.8F)); this.canBeCollidedWith(); { boolean o; o = true; } } for (int j = 0; j < 8; ++j) { this.worldObj.spawnParticle(EnumParticleTypes.BLOCK_CRACK, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, new int[] {Block.getIdFromBlock(Blocks.DIRT)}); } if (this.worldObj.isRemote) { this.setDead(); } } }
  6. So I'm messin' around with this spell I'm working on. It does, this.doBlockCollisions(); when OnImpact EntityLivingBase to pierce through entities, but when it goes through the first one, it disappears. It still exists and continues through the first entity to hit the ones behind it. It just doesn't render for some odd reason. I can instead OnImpact do this seperately And it will travel through blocks and entities and not disappear at all: if (!this.worldObj.isRemote) { this.doBlockCollisions(); } The thing is it doesn't need to travel through blocks it only needs to travel through entities. This should work darn it. Here is the one where it travels through blocks and entities and doesn't disappear: public class EntityEarthOrb extends EntityOrb2 { public EntityEarthOrb(World worldIn) { super(worldIn); } public EntityEarthOrb(World worldIn, EntityLivingBase throwerIn) { super(worldIn, throwerIn); } public void onUpdate() { super.onUpdate(); this.worldObj.spawnParticle(EnumParticleTypes.BLOCK_CRACK, posX + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) / 2, posY + (worldObj.rand.nextFloat() / -2 - worldObj.rand.nextFloat()) / -1.3, posZ + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) / 2, 0, 0, 0, new int[] {Block.getIdFromBlock(Blocks.DIRT)}); ++ticksExisted; if (this.ticksExisted >= 54) { this.setDead(); } } public EntityEarthOrb(World worldIn, double x, double y, double z) { super(worldIn, x, y, z); } protected void onImpact(RayTraceResult result) { if (result.entityHit != null) { int i = 0; if (result.entityHit instanceof EntityLivingBase) { i = 4; } result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)i); worldObj.playSound((EntityPlayer)null, posX, posY, posZ, SoundEvents.BLOCK_GRASS_BREAK, SoundCategory.NEUTRAL, 0.8F, 1.5F / (worldObj.rand.nextFloat() * 0.4F + 0.8F)); } for (int j = 0; j < 8; ++j) { this.worldObj.spawnParticle(EnumParticleTypes.BLOCK_CRACK, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, new int[] {Block.getIdFromBlock(Blocks.DIRT)}); } if (!this.worldObj.isRemote) { this.doBlockCollisions(); } } } Here is the one that will die when it hits blocks but disappear after going through the first entity it hits: public class EntityEarthOrb extends EntityOrb2 { public EntityEarthOrb(World worldIn) { super(worldIn); } public EntityEarthOrb(World worldIn, EntityLivingBase throwerIn) { super(worldIn, throwerIn); } public void onUpdate() { super.onUpdate(); this.worldObj.spawnParticle(EnumParticleTypes.BLOCK_CRACK, posX + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) / 2, posY + (worldObj.rand.nextFloat() / -2 - worldObj.rand.nextFloat()) / -1.3, posZ + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) / 2, 0, 0, 0, new int[] {Block.getIdFromBlock(Blocks.DIRT)}); ++ticksExisted; if (this.ticksExisted >= 54) { this.setDead(); } } public EntityEarthOrb(World worldIn, double x, double y, double z) { super(worldIn, x, y, z); } protected void onImpact(RayTraceResult result) { if (result.entityHit != null) { int i = 0; if (result.entityHit instanceof EntityLivingBase) { i = 4; } result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)i); worldObj.playSound((EntityPlayer)null, posX, posY, posZ, SoundEvents.BLOCK_GRASS_BREAK, SoundCategory.NEUTRAL, 0.8F, 1.5F / (worldObj.rand.nextFloat() * 0.4F + 0.8F)); this.doBlockCollisions(); } for (int j = 0; j < 8; ++j) { this.worldObj.spawnParticle(EnumParticleTypes.BLOCK_CRACK, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, new int[] {Block.getIdFromBlock(Blocks.DIRT)}); } if (this.worldObj.isRemote) { this.setDead(); } } } any ideas?
  7. I would like to pulverize something that is not in my mod, nor in vanilla. It is an entity that exists within someone elses mod. So how do I do this anyways? Is this possible? if (result.entityHit != null) { int i = 0; if (result.entityHit instanceof EntityLivingBase) { i = 4; } result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)i); worldObj.playSound((EntityPlayer)null, posX, posY, posZ, SoundEvents.BLOCK_GRASS_BREAK, SoundCategory.NEUTRAL, 0.8F, 1.5F / (worldObj.rand.nextFloat() * 0.4F + 0.8F)); }
  8. I had to learn by frustratingly watching mcrayfish youtube videos. (which did not pay off and confused the daylights out of me) At the start of this year I knew no java whatsoever. The little I know now I have learned from playing minecraft, messing around on forge, and pestering people on here. Good place to learn.
  9. Alright, #1 Download the mdk. #2 Unzip it into a folder. #3 Make a New Text Document named "gradle.properties" #4 inside it put "org.gradle.jvmargs=-Xmx1300M" #5 put that in the folder you extracted the mdk in. #6 open build.gradle and make sure after your last line it looks like this: // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } sourceCompatibility = 1.8 targetCompatibility = 1.8 #7 Shift right click in the folder you did this all in and open command prompt #8 gradlew setupDecompWorkspace #9 gradlew eclipse #10 I have wrote an example mod for you that features an example tab, example item, example entity. Delete the src that came with the mdk, and insert this one: https://www.dropbox.com/s/npqsjfyga587vyq/examplemodsrc.7z?dl=0 #11 open up the eclipse folder you extracted from the mdk with eclipse like you would a workspace. #12 have fun #13 gradlew build to find what you built, -->build-->libs #14 rename, drag and drop into the "mods" folder
  10. I would look up how to register and render an item, block, or entity. 1.7.10 guides won't do you any good at all. If you can find some 1.10.2 mods with an open src and look at their layout that may help.
  11. [glow=green,2,300]It only allows me to lock it, <--- This smiley needs to be added Dude, have you seen this glow stuff? This is awesome.[/glow]
  12. hahahaha sweeeet. It actually works.... now how do i delete this thing?
  13. As it says "forge modder" over there by my name now. It still applies. Where do I go to do this?
  14. Like over there by my name <--- it says "I am new!" and I'm like.... October 26, 2015, 04:17:19 am c'mon now. Can I have a cool personal text like: Super Pirate Ninja or something like that. I've had this one for a long time... I'd like something a little genuine. I've had a mod for almost a year, it don't even say mod author "I am new!" It just frankly establishes how much of a noob I really am. While "I am new!" Is nice and all, "Super Pirate Ninja" Is officially cooler. Can I change it myself since its "personal text" or does a moderator have to change it?
  15. I guess it'l have to be a normal tree mod then *sigh* seriously though, core mods are lame.
  16. well now he knows
  17. Screw you pal. First of all you only said to put them in order you werent the one who said to start a new world I blame this guy.
  18. Oh that's fantastic! Big trees!? You should look up how to make a big tree core mod Oh, that would be amazing! Then everyone would have trees!
  19. Screw you pal.
  20. That "Useless" bucket makes it so lava and water bucket recipes don't consume the bucket. -It only looks useless, I don't blame you.
  21. Did you make sure to add the: Item item = (new ItemBucket(Blocks.AIR)).setUnlocalizedName("bucket").setMaxStackSize(16); ?
  22. I don't believe you.
  23. where the following happens: public class GuruItems { public static Item AIR_ORB; public static Item WATER_ORB; public static Item EARTH_ORB; public static Item FIRE_ORB; public static Item NETHER_ORB; public static Item INVISIBLE_ORB; public static Item CREATIVE_ORB; public static void init() { Item item = (new ItemBucket(Blocks.AIR)).setUnlocalizedName("bucket").setMaxStackSize(16); AIR_ORB = new ItemAirOrb().setUnlocalizedName("air_orb").setMaxStackSize(64).setCreativeTab(ModCreativeTabs.the_basic_elements); WATER_ORB = new ItemWaterOrb().setUnlocalizedName("water_orb").setContainerItem(item).setMaxStackSize(64).setCreativeTab(ModCreativeTabs.the_basic_elements); EARTH_ORB = new ItemEarthOrb().setUnlocalizedName("earth_orb").setMaxStackSize(64).setCreativeTab(ModCreativeTabs.the_basic_elements); FIRE_ORB = new ItemFireOrb().setUnlocalizedName("fire_orb").setContainerItem(item).setMaxStackSize(64).setCreativeTab(ModCreativeTabs.the_basic_elements); NETHER_ORB = new ItemNetherOrb().setUnlocalizedName("nether_orb").setMaxStackSize(64).setCreativeTab(ModCreativeTabs.the_basic_elements); INVISIBLE_ORB = new ItemInvisibleOrb().setUnlocalizedName("invisible_orb").setMaxStackSize(64).setCreativeTab(ModCreativeTabs.the_basic_elements); CREATIVE_ORB = new ItemCreativeOrb().setUnlocalizedName("creative_orb").setMaxStackSize(64).setCreativeTab(ModCreativeTabs.the_basic_elements); } public static void register() { GameRegistry.register(AIR_ORB.setRegistryName ("air_orb")); GameRegistry.register(WATER_ORB.setRegistryName ("water_orb")); GameRegistry.register(EARTH_ORB.setRegistryName ("earth_orb")); GameRegistry.register(FIRE_ORB.setRegistryName ("fire_orb")); GameRegistry.register(NETHER_ORB.setRegistryName ("nether_orb")); GameRegistry.register(INVISIBLE_ORB.setRegistryName ("invisible_orb")); GameRegistry.register(CREATIVE_ORB.setRegistryName ("creative_orb")); } public static void registerRenders() { registerRender(AIR_ORB); registerRender(WATER_ORB); registerRender(EARTH_ORB); registerRender(FIRE_ORB); registerRender(NETHER_ORB); registerRender(INVISIBLE_ORB); registerRender(CREATIVE_ORB); } private static void registerRender(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } Re order them in the order you would like. If this helped, give me a smite. (you know you want to)
  24. These two objects are not the same. You should come back when you understand Java because it is clear that you do not know wtf you are doing. I got a good laugh. "Because, magic doesn't shoot from a dispenser, that's why!" I smited you just for fun though
  25. Maybe there will be some luck and LexManos will read this discussion then post a reply as to what direction this is going.
×
×
  • Create New...

Important Information

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