-
Posts
1689 -
Joined
-
Last visited
-
Days Won
1
Everything posted by SanAndreaP
-
so your custom lang file has those weird characters? If so, then your file encoding may be ANSI, but it must be UTF-8
-
[1.7.2] Custom crop like a potatoe that grows 2 blocks high
SanAndreaP replied to SantacreeperLP's topic in Modder Support
Should it grow like reed or like wheat? -
There are so many things wrong with your mod that I can't list them here, since I barely have time right now. I would suggest a major cleanup and refactoring...
-
[1.7.2]Minecraft Crashing, Unsure why
SanAndreaP replied to Delta 72 Knight's topic in Modder Support
You need to add myFluidInstance#setBlock(myBlockInstance) after you've initialized your block and fluid. -
[1.7.2][SOLVED!]Changing block texture when wearing helmet
SanAndreaP replied to Nimbleguy's topic in Modder Support
So you don't see the "updateAnimation" string in your console? I've tried the animation thingy for blocks now and it works for me. Here's the example code I've made up: https://gist.github.com/SanAndreasP/06fb4c4ecaa9e1e1e746 Maybe you can spot the difference... -
[1.7.2][Fixed]New Crust Block won't stop melting
SanAndreaP replied to Lylac's topic in Modder Support
Light Level != Light Opacity! It's just a math problem. Just check if the saved light value is >= 14 -
You also thought about when the player logs out / quits the game within the dimension and logs back in / load it up again and then they change the dimension? If you want overall less light, override generateLightBrightnessTable in your provider and use the vanilla calculation, whereas multiply the end result with 0.8F or so (like lightBrightnessTable[i] *= 0.8F ), which means 80% less overall light in your dimension (even block light).
-
per game No seriously, it's like the old block IDs, if you register too much entities with registerGlobalEntityId(), then you can't register more. That's what registerModEntity is for, to not have this kind of limitations.
-
How To Create A GUI in Minecraft 1.7.2?? Forge Modding
SanAndreaP replied to lolgamerbob's topic in Modder Support
You mean this tutorial, right? http://www.minecraftforge.net/wiki/Basic_GUI The only thing different from the tutorial and the current Forge is that there's an @NetworkMod annotation in the tut, which doesn't exist anymore, therefore you can just ignore it. -
Have some pseudocode: method onBlockActivated start if world#isRemote == false then ItemStack myItemStack = new ItemStack([myItemInstance], [count], [damage]) EntityItem myItemEntity = new EntityItem([world], [x], [y], [z], myItemStack) world#spawnEntityInWorld(myItemEntity) end if end method
-
How To Create A GUI in Minecraft 1.7.2?? Forge Modding
SanAndreaP replied to lolgamerbob's topic in Modder Support
Define "it is not working" -
override onBlockActivated and spawn an EntityItem with your custom Item within that method. Also when you spawn entities, please check if you're on the server.
-
You quoted your answer... It can't find AutoUtils, so go get it.
-
[1.7.2][SOLVED!]Changing block texture when wearing helmet
SanAndreaP replied to Nimbleguy's topic in Modder Support
Question here, does it now call the updateAnimation method? -
If you spawn an entity with an constructor like Entity(worldObj, x, y, z) on the server, the server sends a packet to the client and the client will also spawn it with the (entitys standard) constructor Entity(worldObj) in the client world. That's why you should always spawn an entity on the server, or you'll get duplicates on the client. How would the client know about the entity otherwise except excessive network transfer? This setup is there to prevent exactly that. So yes, it's intended.
-
[1.7.2][Fixed]New Crust Block won't stop melting
SanAndreaP replied to Lylac's topic in Modder Support
if (p_149674_1_.getSavedLightValue(EnumSkyBlock.Block, p_149674_2_, p_149674_3_, p_149674_4_) > 11 - this.getLightOpacity()) You set the light opacity to 15 in your constructor, I'll let you do the math. -
Although you can't change time directly per dimension, what you can do is overriding the calculateCelestialAngle method in your provider and return a value where it's midnight (idk the correct value for it right now)
-
The question is how do you register entities? If you use registerGlobalEntityId(), then yes, there's a cap (AFAIK max 256 entities) If you just use registerModEntity(), then there shouldn't be a problem.
-
Get a mob to have random texture when spawned?
SanAndreaP replied to HappleAcks's topic in Modder Support
I haven't worked with the Data Watchers much before, so I got lost a little bit. So I'll create the method, but how do I save and read from the watcher [in order to call from 1 of my 6 possible textures]. First, you need to register a field ("object") inside the DataWatcher with the DataWatcher#addObject(id, initialValue) method, preferably inside the entityInit() method in your entity. id is an unique object id which you need to reference the object. Please note that there are pre-occupied IDs already, so if it crashes with the ID, try another one. Also there's a cap of max. 32 objects within a DataWatcher. initialValue is pretty self-explanatory. Possible data types can be: ItemStack, String, Integer, Short, Byte, Float, ChunkCoordinates . Either use new DataType() (e.g. new ItemStack(...) ) or, for primitive datatypes, cast it (e.g. to have a short, use (short) 10 ) Second, to get an object from the DataWatcher, use DataWatcher#getWatchableObject[DataType](id) , where [DataType] is the datatype you've defined previously (e.g. for integer, use getWatchableObjectInt(id)). The only exceptions where you can't use this is ChunkCoordinates. Here's a list of datatypes and getters: ItemStack : getWatchableObjectItemStack String : getWatchableObjectString Float : getWatchableObjectFloat Integer : getWatchableObjectInt Short : getWatchableObjectShort Byte : getWatchableObjectByte Third, to write to the defined object, use DataWatcher#updateObject(id, newValue) , which follows the same rules as the in initialValue from the registration for the newValue. Also make sure to only update values on the server (worldObj.isRemote == false), or you get discrepancies with client and server. -
[1.7.2][SOLVED!]Changing block texture when wearing helmet
SanAndreaP replied to Nimbleguy's topic in Modder Support
hm... Can you do a println() in your registerBlockIcons method and see if the VoidMod.texNullOre is null? EDIT: I just noticed that the registerBlockIcons method is called before the event and thus you assign null to your blockIcon (why it works for me, I have no clue). So instanciate your texture atlas whilst defining the field. Then use the reference in the event and the registerBlockIcons method (you just move the new TextureNullOre() from the event into the main mod, where you declare your field for it) -
[1.7.2][SOLVED!]Changing block texture when wearing helmet
SanAndreaP replied to Nimbleguy's topic in Modder Support
can you still post it? -
What if there's a potion shown below (after) the modded one? I suspect it uses the new texture then...
-
[1.7.2][SOLVED!]Changing block texture when wearing helmet
SanAndreaP replied to Nimbleguy's topic in Modder Support
If you get the missing icon, there must be something mentioned in the log. Can you give it to us? -
[1.7.2][SOLVED!]Changing block texture when wearing helmet
SanAndreaP replied to Nimbleguy's topic in Modder Support
How to get your TextureAtlas to work: First make a new instance of it and save it in a static class field, so that you can reference it anywhere. Use the TextureStitchPre event, instantiate the static field, and there, use the event to register your instance texture atlas. Example code here: https://github.com/SanAndreasP/EnderStuffPlus/blob/master/java/de/sanandrew/mods/enderstuffplus/client/event/IconRegistry.java Note: event.map.getTextureType() MUST be equal to 0 here instead of 1, since it's the texture sprite for blocks! If you've done that, go to your block and use the texture atlas instance in your blocks getIcon() methods, Example code can be found here, it's an item, but it should also be similar to the block: https://github.com/SanAndreasP/EnderStuffPlus/blob/master/java/de/sanandrew/mods/enderstuffplus/item/ItemAvisCompass.java#L62-L64 assign your blockIcon field inside your block with the texture atlas instance, preferably within the registerIcons() method (also DO NOT call the super method in this case! It will either complain about a missing/duplicate texture, or assign the same texture again!)