-
Posts
613 -
Joined
-
Last visited
Everything posted by Bedrock_Miner
-
Declare Mod as Singleplayer only in 1.8
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
I have no error message. A normal Mod seems to be disabled when joining a Server with the mod not installed. (For instance: You have two Mods installed, maybe Thaumcraft and a Minimap and join a vanilla server, Thaumcraft is completely disabled while you still have your Minimap) -
Heyho Guys! Just like the title says, I need to know how to find out if a player (username is given) is an Operator. Thanks in advance!
-
Heyho Guys! Just a small question: How do you declare a mod as Singleplayer only so that it is not deactivated on a server? (like a minimap) I'm using Forge for 1.7.10.
-
anyone?
-
Heyho Guys! I have seven Mods compiled and ready to download but now I recognised, that gradle copied the .java files into the jar. I don't want this to happen because it takes much memory space. I think the problem is my build.gradle file where I entered buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } apply plugin: 'forge' version = "x.x.x-mcx.x.x" group= "com.bedrockminer.modid" archivesBaseName = "Modname" sourceSets { main { java { srcDirs = ["$projectDir/src"] } resources { srcDirs = ["$projectDir/src"] } //Same directory as java! } } minecraft { version = "1.7.2-10.12.1.1060" assetDir = "eclipse/assets" } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } If I change the asset path to $projectDir/src/assets the assets are directly copied into the jar without the assets folder. What can I do to exclude the .java files from the mod but copy the assets correctly?
-
Entities with collision box and/or light effect
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
For this project I have done it with a TileEntity, because this seemed to be easier for this purpose. One question about this: Which method do I have to override to make the block "hitable" and thus damageable with swords? Well, I started another project which needs the same feature but a bit more difficult: Some people should be able to pass the barrier, namely the Owner and people in his team. How could this feature be achieved? -
Heyho Guys! I planned to create a barrier which is basically an entity, thus it can be damaged. But this barrier should prevent players (or other entities) from walking through it. I thought about adding transparent blocks at the place the entity is but this shows two problems: 1st: The Blocks prevent the entity from being damaged because of their bounding box. 2nd: The entity sometimes moves a few blocks upwards (I think because of the block at its position, just like Items do) I also tought about a kind of selfmade collision. I checked for colliding Entities and assigned 0 to their motion variables. The problem was, that this had no effect. Some experiments showed, that I can't set the motion of a creative-mode-player. The player doesn't move at all. How can I create the barrier with one of those methods and how can I fix the corresponding errors?
-
Thanks, this works well
-
Thank you! And how can I find out the active language? Or, even more important: How can I check whether the language has been changed? Is there a special event?
-
Heyho Guys! For my mod I want to create a book which explains everything. To structure the content I want to use a json file as the database for the book. I want to create a json file for each language my mod should support. And the json files should be changeable via resourcepacks, so I decided to save them in the folder assets/lang/book. How can I access this folder from the code? I need a File object, that's obvious, but how can I get the actual assets path?
-
I already checked the isDead field in my update event handler; its always false.
-
If the attackEntityEvent is fired everytime, how can I find out whether the minecart gets destroyed or not?
-
But a minecart doesn't gets distroyed directly. Is the attack event only fired once then? (Please take a look at the edit of my first post)
-
Heyho Guys! I want to create an upgrade item for minecarts which can be applied by clicking on them. This Item should drop if the minecart is destroyed. Actually, I can't find an event which is fired if a minecart gets destroyed. Which event do I have to subscribe to? EDIT:It would be great if you also can tell me an event for a minecart being rendered!
-
Finally solved: (1.7.2) Custom Particles just rendered black
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
Yes, it helped! I missed the setBrightness... Now it finally works -
Finally solved: (1.7.2) Custom Particles just rendered black
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
PLEASE HELP!!! I have no Idea what can be wrong - I tried everything... Maybe it would help if someone posts code for working custom particles... -
Subscribe to the event for jumping (I think ist livingJumpEvent or playerJumpEvent) and set the y velocity of the player to maybe 2.0.
-
Finally solved: (1.7.2) Custom Particles just rendered black
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
I compared the state when the particles are black with the state when they are coloured, but I can see no difference! Here is the data your GLDebugger put out: GL_VERTEX_ARRAY:false (Vertex array enable) GL_NORMAL_ARRAY:false (Normal array enable) GL_COLOR_ARRAY:false (RGBA color array enable) GL_INDEX_ARRAY:false (Color-index array enable) GL_TEXTURE_COORD_ARRAY:false (Texture coordinate array enable) GL_EDGE_FLAG_ARRAY:false (Edge flag array enable) GL_NORMALIZE:true (Current normal normalization on/off) GL_FOG:true (True if fog enabled) GL_LIGHTING:false (True if lighting is enabled) GL_COLOR_MATERIAL:true (True if color tracking is enabled) GL_LIGHT0:false (True if light 0 enabled) GL_LIGHT1:false (True if light 1 enabled) GL_LIGHT2:false (True if light 2 enabled) GL_LIGHT3:false (True if light 3 enabled) GL_LIGHT4:false (True if light 4 enabled) GL_LIGHT5:false (True if light 5 enabled) GL_LIGHT6:false (True if light 6 enabled) GL_LIGHT7:false (True if light 7 enabled) GL_POINT_SMOOTH:false (Point antialiasing on) GL_LINE_SMOOTH:false (Line antialiasing on) GL_LINE_STIPPLE:false (Line stipple enable) GL_CULL_FACE:true (Polygon culling enabled) GL_POLYGON_SMOOTH:false (Polygon antialiasing on) GL_POLYGON_OFFSET_POINT:false (Polygon offset enable for GL_POINT mode rasterization) GL_POLYGON_OFFSET_LINE:false (Polygon offset enable for GL_LINE mode rasterization) GL_POLYGON_OFFSET_FILL:false (Polygon offset enable for GL_FILL mode rasterization) GL_POLYGON_STIPPLE:false (Polygon stipple enable) GL_TEXTURE_1D:false (True if 1-D texturing enabled ) GL_TEXTURE_2D:true (True if 2-D texturing enabled ) GL_TEXTURE_GEN_S:false (Texgen enabled (x is S, T, R, or Q)) GL_TEXTURE_GEN_T:false (Texgen enabled (x is S, T, R, or Q)) GL_TEXTURE_GEN_R:false (Texgen enabled (x is S, T, R, or Q)) GL_TEXTURE_GEN_Q:false (Texgen enabled (x is S, T, R, or Q)) GL_SCISSOR_TEST:false (Scissoring enabled) GL_ALPHA_TEST:true (Alpha test enabled) GL_STENCIL_TEST:false (Stenciling enabled) GL_DEPTH_TEST:true (Depth buffer enabled) GL_BLEND:true (Blending enabled) GL_DITHER:true (Dithering enabled) GL_INDEX_LOGIC_OP:false (Color index logical operation enabled) GL_COLOR_LOGIC_OP:false (RGBA color logical operation enabled) GL_AUTO_NORMAL:false (True if automatic normal generation enabled) Any Ideas which setting can cause the problem? Additional question: Is it possible to render the particles in front of water? Normally they are always rendered behind water, even if they are in front of it. (Also with vanilla particles, try it out!) -
Heyho Guys! I want to create an entity which is not dismountable. If a player mounts it, he gets stuck for about five seconds, then the Entity kills itself. How can I prevent the player from dismounting the entity before it dies?
-
[1.7.2] setPotionEffect instant heal problem [please help]
Bedrock_Miner replied to chiyin00's topic in Modder Support
use the onEaten method and write player.addPotionEffect(new PotionEffect(Potion.heal.id, duration (1), amplifier(0))); or just use player.heal(amount); -
Heyho guys! I created some beam like entities which damage any living entity in their range. The problem is, that because of the slight knockback on damaging entities, they are pushed out of the beams range. I want to know, how I can disable the knockback effect for this damaging.
-
HELP! Weird Entity behaviour with setPositionAndRotation
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
I really don't know WHY this bug happens but now I solved it! If i call the method for updating the position from a tick handler which runs along with the lifetime of the entity it works. Obviously, the entity has somehow no access to itself via the this token. Don't know why, but now its running -
HELP! Weird Entity behaviour with setPositionAndRotation
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
I experimented a bit and encountered the following: -x, y and z value show this behaviour -The position of the value is the position that was set before spawning the entity, as if the method there was called several times (its only called once, I checked it). If I set the before spawn method to (owner.posX + 5, ...) the Entity is always five blocks away from the owner, no matter how I try to replace it. But the method is in the constructor and only called once, I only use it to ensure the Entity doesn't spawn in an empty chunk! -The values on client side are slightly different from the once on the server side. Is this normal? (0.0 on Server -> 0.34375 or -0.40625 on client) -
HELP! Weird Entity behaviour with setPositionAndRotation
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
Not sure. And I have no Idea how to find this out or even fix it -
HELP! Weird Entity behaviour with setPositionAndRotation
Bedrock_Miner replied to Bedrock_Miner's topic in Modder Support
Maybe this helps: If I output the values every Tick I get this result: [15:22:17] [server thread/INFO] [FML]: Position:(10.936262235862642|76.0|12.26463907810521) [15:22:17] [Client thread/INFO] [FML]: Position:(10.90625|66.0|12.25) The entity should be 10 blocks above the player who us standing at 10.9|66|12.3. If I set the height to a constant value (80) and add this line to the client-side only code this.posY = 80; I see the Entity still at the player's position but it is placed at y=80 everytime a player moves; and afterwards (1 Tick later) it's set back to the players position. This seems to be affected only by the setPosition method, all the other code is ok: I created a new Entity which only adjusts its position to the player's one (with an offset) and this shows the same behaviour. package com.bedrockminer.magicum.entity.magic; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import com.bedrockminer.lib.util.render.Vertex; import com.bedrockminer.magicum.Main; public class EntityMagicTest extends Entity { private EntityLivingBase owner; public EntityMagicTest(World par1World) { super(par1World); } public EntityMagicTest(World par1World, EntityLivingBase owner) { super(par1World); this.owner = owner; this.copyLocationAndAnglesFrom(owner); } @Override public void onUpdate() { super.onUpdate(); if (!this.worldObj.isRemote && this.owner == null) { this.setDead(); return; } if (!this.worldObj.isRemote) { this.setLocationAndAngles(this.owner.posX, this.owner.posY + 1, this.owner.posZ, 0, 0); //Or setPosition? I think they are similar to each other Main.log("OwnerY:" + this.owner.posY + ", thisY:" + this.posY); } Main.log("Position:" + new Vertex(this.posX,this.posY,this.posZ)); } @Override protected void entityInit() { } @Override protected void readEntityFromNBT(NBTTagCompound var1) { } @Override protected void writeEntityToNBT(NBTTagCompound var1) { } }