-
Posts
375 -
Joined
-
Last visited
Everything posted by gurujive
-
I'm not quite certain how to go about this, but here's what I got: Main class: package exampled.modinfo; import exampled.modinfo.init.ExampledEntities; import exampled.modinfo.init.ExampledItems; import exampled.modinfo.proxy.CommonProxy; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.registry.GameRegistry; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_VERSION) public class Exampled { @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS) public static CommonProxy proxy; @Instance(Reference.MOD_ID) private static Exampled instance; private static ResourceLocation rsrcl; @EventHandler public void preInit(FMLPreInitializationEvent event) { ModCreativeTabs.load(); proxy.preInit(); ExampledItems.init(); ExampledItems.register(); ExampledEntities.registerEntities(rsrcl); initRecipes(); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRenders(); proxy.registerKeybindings(); NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy); } private static void initRecipes() { GameRegistry.addRecipe(new ItemStack(ExampledItems.SPHERE), new Object[] {" X ", "X X", " X ", 'X', Item.getItemFromBlock(Blocks.DIRT)}); } public static Exampled getInstance() { return instance; } public static Exampled ResourceLocation() { return rsrcl; <----- only red is located here, having rsrcl underlined. Using auto fix removes the red but crashes on launch. } } ModEntities class (no red here) but just in case: package exampled.modinfo.init; import exampled.modinfo.Exampled; import exampled.modinfo.entity.EntitySphere; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.EntityRegistry; public class ExampledEntities { private static int id = 0; public static void registerEntities(ResourceLocation rsrcl) { // TODO Auto-generated method stub register( rsrcl, EntitySphere.class, "sphere"); } private static void register(ResourceLocation rsrcl, Class cls, String name) { EntityRegistry.registerModEntity( rsrcl, cls, name, id++, Exampled.getInstance(), 128, 214, true); } }
-
It leads back to EntityRegistry.registerModEntity
-
warning: [options] bootstrap class path not set in conjunction with -source 1.6 Execution failed for task ':compileJava' I would begin by changing the 1.6's in the gradle.build to 1.8's so that my project would open up in my ide compatible with java 8. Not doing so before gradlew setupDecompWorkspace *can lead to extra files in your build, after running gradlew eclipse then running build. Either way... good luck to you. This is where I would start though.
-
[1.11] Changes on how to register entities?
gurujive replied to American2050's topic in Modder Support
I realize this... -
[SOLVED] is there a way to get stack.stackSize in 1.11 ?
gurujive replied to trollworkout's topic in Modder Support
Well, you're doin' a good job. Keep it up -
[SOLVED] is there a way to get stack.stackSize in 1.11 ?
gurujive replied to trollworkout's topic in Modder Support
Yes, the decrement method is actually just an alias that uses the increment method. This is just for aesthetics, because stack.increment(-1) looks weird. When did you get 26,000 somethin' posts? I'm pretty certain that takes about 20 years. (There's no way) Edit: ok, so about 4 years.. -
Model elements fighting to render over each other
gurujive replied to BeardlessBrady's topic in Modder Support
To acquire no z-fighting, You gotta make sure that none of your elements are going into each other (no overlapping textures) Then after that is accomplished the fun part begins. Go in and manually turn all faces that are inwards (facing towards the inner part of the elements) into the black part of ether the white or black window pane png. The black part on black window pane renders as black once a block is placed and renders invisible on item models. On connected pieces you would make the ends of the smaller pieces transparent connecting to a larger piece. If its connected one of the two elements need to be transparent. When done you will have no z fighting (which is a blast when each one of your models has 49 elements to it) -
[SOLVED] is there a way to get stack.stackSize in 1.11 ?
gurujive replied to trollworkout's topic in Modder Support
but it was so beautiful.... if (!playerIn.capabilities.isCreativeMode) { --itemStackIn.stackSize; } -
class 1: class 2 that extends CreativeTabs: anything other than that I would imagine json... src/main/resources/assets.textures.entity.sphere.png { "ambientocclusion": false, "textures": { "0": "exampled:entity/sphere", "1": "blocks/glass_pane_top_black" },
-
[1.11] Changes on how to register entities?
gurujive replied to American2050's topic in Modder Support
please keep this going, whatever happens. I don't like the jerky entities :[ , Like I can kinda see what they are getting at, but making all the thrown entities derpy would really suck, and doesn't work for projectiles. EntityRegistry.registerModEntity(128, 214, true); -
[SOLVED] is there a way to get stack.stackSize in 1.11 ?
gurujive replied to trollworkout's topic in Modder Support
I'm totally stoked man I can hardly wait.... magical llamas :] skeleton wizards >-|o|> -
[SOLVED] is there a way to get stack.stackSize in 1.11 ?
gurujive replied to trollworkout's topic in Modder Support
This isn't working for me, and I have no code errors (and I went back through and changed the entities accordingly to 1.11) (I can share src if need be): What exactly isn't working? Forge hasn't yet added the ability to register entities in 1.11, so it's unlikely that any modded entity will work. With the changes when you right click it wont render the entity, but the entity will act as an entity and does exist. The item will drop and is visible in hand. So that sounds about right, I do believe. [/img] -
[SOLVED] is there a way to get stack.stackSize in 1.11 ?
gurujive replied to trollworkout's topic in Modder Support
This isn't working for me, and I have no code errors (and I went back through and changed the entities accordingly to 1.11) (I can share src if need be): -
[SOLVED] is there a way to get stack.stackSize in 1.11 ?
gurujive replied to trollworkout's topic in Modder Support
ItemStack is not visible. -
[1.11] Changes on how to register entities?
gurujive replied to American2050's topic in Modder Support
Yeah man I just went to build a snowball and it didn't work. I set up everything according to 1.11 changes entitythrowable --- >entityorb entitysnowball --- > entitysphere extends entityorb itemsnowball----> itemsphere I just transfered it over and my entity was invisible, it did however fly and made impact, and I was able to adjust stack size and situate the tab and such. Item with custom json and texture visible both in hand and on ground. entity can't be found when searching for it in the chat either. I'll just chill for a minute til this is groovy. -
meh..... I hope I can get this to start working.... The item shows up in the named tab but when I throw it, it disappears and doesn't render... It flies through the air and can hit things like entities and do damage and make noise, but its invisible.... edit: New mdk update... i'll see how it goes *fingers crossed* edit2: Its cool. (please keep this going on EntityRegistry.registerModEntity( 64, 107, true);
-
I can see it right here..... I don't know what's going on here... So I figured I'd ask... I am in need of this. public static final DecimalFormat DECIMALFORMAT = new DecimalFormat("#.##"); /** Size of the stack. */ private int stackSize; /** Number of animation frames to go when receiving an item (by walking into it, for example). */ private int animationsToGo;
-
Why In The World Does This Happen!?!??!? (Weird teleportation?)
gurujive replied to gurujive's topic in Modder Support
Are there consequences? -
Why In The World Does This Happen!?!??!? (Weird teleportation?)
gurujive replied to gurujive's topic in Modder Support
I have discovered I can hold shift and right click then spam it to reproduce without the logs. (it functions differently with the logs) It does not happen if there is no spam clicking... the entity is spawned in 6.8 above my player and then comes down, and hits him. Like I can walk around and shift right click all day as long as I don't spam it. Do it as many times as I like, the buff is applied and I run around. But when spammed, the story is completely different resulting in being teleported to 6.8. Sure it says my player is at y=6.8, but I'm basically lieing to my entity, saying that I'm 6.8 above where I am. The entity is spawned in 6.8 above my players head. (something like that anyways.) This also has very different results from the workspace forge src than after I've built it and ran it on the real deal. In the workspace if I stand on a flat roof and do this, I will go down to where there is open space. (like roof top to inside of a room). Not y=6. With built version though, this doesn't function and instead teleports me to 6.8 only if I spam it. -
Here is an image showing my player on some wood blocks at the highest build limit: Here is an image showing my player after shift right clicking with an orb in my hand and looking towards the seams of the logs: What happens: When doing this with logs (I haven't found anything else *so far*) I can position my player atop a minimum of 4 logs. Then shift right click and my player will be pulled through all obstruction (including bedrock) to what shows up as 6 when pressing f3. Like an instant downward obstruction free teleportation method. I have done this in multiple worlds at different heights leading to the same result. The thing is, is that I honestly don't know WHY it happens. I know how to reproduce it. But that still doesn't add up to why this happens . (It is definately an interesting way to reach lower levels of minecraft though). I would really like to know if there is a way to add obstructions in the way of it so I could make a downward travel system with multiple floors, its still cool either way. There is not anything in my code relating to teleporting of any kind. (its odd) Here is the entirety of the orb itself: item: Entity: Entity Orb2 which it extends:
-
i got it else if (!worldIn.isRemote && playerIn.isSneaking()) { EntityOrb entitythrowable = new EntityOrb(worldIn, playerIn); playerIn.posY = 7; entitythrowable.func_184538_a(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 0.001F, 0.0F); entitythrowable.addVelocity(0.0, -0.1, 0.0); worldIn.spawnEntityInWorld(entitythrowable); }
-
I'm looking to spawn an entity above the player at such n such height on right click when shift is held. This is what I have, but no matter where my player is it will only spawn at 8 and not follow my players position: public class ItemOrb extends Item { public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) { if (!playerIn.capabilities.isCreativeMode) { --itemStackIn.stackSize; } worldIn.playSound((EntityPlayer)null, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.4F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); if (!worldIn.isRemote && !playerIn.isSneaking()) { EntityOrb entitythrowable = new EntityOrb(worldIn, playerIn); entitythrowable.func_184538_a(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); worldIn.spawnEntityInWorld(entitythrowable); } else if (!worldIn.isRemote && playerIn.isSneaking()) { EntityOrb entitythrowable = new EntityOrb(worldIn, playerIn); entitythrowable.func_184538_a(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 0.0F, 0.0F); entitythrowable.posY = 8; entitythrowable.addVelocity(0.0, -0.3, 0.0); worldIn.spawnEntityInWorld(entitythrowable); } playerIn.addStat(StatList.getObjectUseStats(this)); return new ActionResult(EnumActionResult.SUCCESS, itemStackIn); } } What I'm really aiming to do here is get it so when I shift and right click the entity will somehow or another make impact with my player. The entity making impact with the player travels through entities and blocks and has no gravity. At the current height it is spawned in at 0 0 0, it does not make impact with the player like it needs to. The above works, but only if my player is at the right world height... Is there a way to do this to where it will spawn above my player a distance of 8 no matter where he is?
-
How Do I Use Custom Reddust Particle Colors For Something?
gurujive replied to gurujive's topic in Modder Support
As you've been told 3 times, MC uses RGB as its color system. The color values range from 0.0 to 1.0, yellow would be 1.0, 1.0, 0. There is no fourth colour parameter. Your "yellow" is invisible because you are spawning it somewhere on the plane z=0, out of render distance. regardless, there is no reason to slander anyone, and there's not anything that constitutes being a prick. This is the "modder harassment" forum I guess. Either way, its not nice, and its not normal. I hope this whole topic is deleted as it is degradation. (the exact opposite of support)