Jump to content

Bregor

Members
  • Posts

    41
  • Joined

  • Last visited

Everything posted by Bregor

  1. Is there a way to remove them on the server side? Because the removeListener method is ClientOnly. Or is there a scenario where more than one would get added, if I don't add them myself?
  2. Thanks - as i suspected then. Then there is still the question if it is possible to have more than one listener on a container.
  3. I'm currently trying to understand the inner workings of containers, but there are some weird things i noticed: Is it possible that a container has more than one listener? As there is one container per Player spawned the listeners array doesn't fit to well in that picture. (Also there is a removeListener method, which is ClientOnly and only called from the GuiRepair and GuiContainerCreative) Is the detectAndSendChanges method only logical server side or both? (I got only server side calls that far).
  4. Hi, I'm trying to create a fluid which should be only usable in buckets, machines, etc. (No need for placing it in the world a block). I tried the following setup, which works fine if i use the standard vanilla water textures, but as soon as i try to use my own (as in the sample below) I only get the missing texture texture. I have the textures and the mcmeta files in the location assets/modid/textures/fluids/. Is there some need to register the texture sprites before using it in a fluid? public class CustomOilFluid extends Fluid { public CustomOilFluid() { super( Constants.FluidNames.customOilFluid, new ResourceLocation(Constants.modId, "fluids/custom_oil_still"), new ResourceLocation(Constants.modId, "fluids/custom_oil_flow") ); } } public class ModFluids { public final static CustomOilFluid customOilFluid = new CustomOilFluid(); public static final void registerFluids() { FluidRegistry.enableUniversalBucket(); FluidRegistry.registerFluid(customOilFluid); FluidRegistry.addBucketForFluid(customOilFluid); } } //In my mods class i have the following static initializer static { ModFluids.registerFluids(); }
  5. Is there any fastest way to define a variant for an invisible block (or what is an valid way at all)?
  6. Hi, Currently i have a blockstate JSON to display a custom model if the block state (my_property) is set to true, in the false state it just displays the missing texture texture. Is it possible to state something like for the block state my_property = false, do not render anything (to create a block with toggle-able invisibility)? { "forge_marker": 1, "variants": { "normal": [{}], "inventory": [{}], "my_property": { "true": { "model": "myModId:my_model.obj" } } } }
  7. Do you know of any open source 1.12 mod using the mentioned "Item override mechanic" or the other "TextureAtlasSprite" techniques?
  8. Is there any way to control whether to render blocks or not (standard blocks and model based blocks) based on the player state (e.g. having equipped an item or holding an item) without using a TESR?
  9. And if the API is just copied over as files as there is no package for it?
  10. How can I have the API sources from a mod and the actual mod together into a development environment? The API source files are added to the project to be able to compile against the API, but if I add the mod itself for testing purposes to the run/mods folder I always get java.lang.NoSuchMethodError when something tries to use the API. Is there a way to have both at once in the dev environment - the API sources for compiling against and the mod itself for testing the stuff in the debugger?
  11. So far i found out that ActiveRenderInfo seems to contain the camera information. And rotationX, rotationXZ, rotationZ, rotationYZ and rotationXY seem to contain the camera orientation. Also Particle.renderParticle seems to do something similar to what I want. But I just can't figure out why the orientation is encoded in these five rotations (or if it is the orientation actually).
  12. I'm trying to render a billboard texture which is always facing to the player. I have found some methods other mods use for such things, like the following code: GlStateManager.rotate(-Minecraft.getMinecraft().getRenderManager().playerViewY, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(Minecraft.getMinecraft().getRenderManager().playerViewX, 1.0F, 0.0F, 0.0F); It seems to work for the normal view, but if changed to third person mode with F5 (especially in the frontal view), things get quite wrong (the texture is facing not at all to the camera). I suspect the actual camera/eye position is different than the player position (which seems to be the content of playerViewX and playerViewY). Is there a way to get the actual camera position (and possible the vector of the direction) instead of the player position only?
  13. I have successfully added them this way. There are just two things I don't fully understand yet: What is the difference between deobfProvided and deobfCompile (or can I even use runtime like in the jei example: runtime "mezz.jei:jei_${mcversion}{jei_version}")? It seems if I add a new mod dependency to build.grade, run setupDecompWorkspace, refresh all Gradle Projects in IntelliJ, run MC - I need to repeat this one or two times until the mod finally loads in the MC client.
  14. What would be a (or the best) way to render a block as a texture which is always facing the user. And the texture should be animated with a few frames. What I want to achieve is a block which is not looking solid, but more like a blob of plasma (Sample Image). Another way to describe it, something that looks a bit like a wisp of thaumcraft - but not as an entity but as a block.
  15. Any idea how this can be done from a maven repository via gradle?
  16. Is it possible to add other mods to the development environment via build.gradle from a maven repository, but not depend on them in the mod iteself. The reason for this is that I want to have some mods to test my blocks with in the dev environment, but they are no dependencies of the mod, more like development conveniences. Yet it would be nice if the mods have not to be manually restored everywhere i check out the mod repository.
  17. Hi, I am looking for a way to have a monospaced multiline text input box in a GUI window. Can you recommend anything usable/salvageable I can start from or do I have to roll my own control? Thanks for your help!
  18. Ok now I am slightly confused, you mean I should use a EnergyStorage internally to store the power? But which interface is the correct one to actually receive power on my TileEntity? With IEnergyReceiver the only event I ever got is canConnectEnergy if some cable is placed beside it.
  19. You mean I need to implement IEnergyStorage instead of IEnergyReceiver or do I need both?
  20. Hi, I am trying to use the CoFH RedstoneFlux API to get my machine blocks powered (https://github.com/CoFH/RedstoneFlux-API). I did just put the files into /src/api/java/cofh/api/energy/*, hope this is correct. I implemented IEnergyReceiver on my machine blocks TileEntity but the only method ever getting called is "boolean canConnectEnergy(ForgeDirection from)" if I place a cable nearby. Do I have to register the block somehow to actually receive energy? Thanks
  21. Ok, makes sense now - just one more thing - is there a way to test if a block's chunk is currently loaded without forcing it to load?
  22. I mean if I can get a TileEntity from a not loaded chunk with something like: world.getBlockTileEntity(i, j, k);
  23. Hi, i got a few questions about the lifetime of tile entities: Is it possible to get another blocks tile entity if the target tile entities block is currently not in a loaded chunk? On the server side is it possible to get an event if a tile entity is unloaded? Thanks
  24. Well I thought about something like the attuning to the master block too, but as there will be many slave nodes for each master I didn't want to force the user to update all nodes after the master node is placed somewhere else or is destroyed by something. And about the tile entity idea, may be worth investigating. Non ticking tile entities are not available before 1.8?
  25. Hi, I am looking for best practices for discovery of specific blocks in the neighborhood of another specific block. To be more specific the scenario I have in mind is a kind of wireless master-slave block relationship. For example if the master block is placed it searches for all slave blocks in a given radius (e.g. 32 blocks radius). Scanning the blocks in range seems to be a bad idea performance wise, as 32 blocks radius would require scanning 262k blocks in worst case. Is it a good idea to keep a global storage of all master blocks and slave blocks without a master block? Or is there a better way to achieve such a thing? Neither the master nor the slave blocks will be generated naturally, but there may be a lot of slave blocks. Thanks
×
×
  • Create New...

Important Information

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