Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

matthew123

Members
  • Posts

    60
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

matthew123's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. I am not sure I follow. I will only need to get the block position very rarely. How is this a problem?
  2. I am getting this ghost stripe: textureManager.bind(TextureLocations.OVERLAY_CHAKRA_BAR); RenderSystem.enableBlend(); RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); matrix.pushPose(); AbstractGui.blit(matrix, x, y, 0, 0, selectedWidth, 4, TEX_WIDTH, TEX_HEIGHT); AbstractGui.blit(matrix, x - 18, y - 11, 0, 4, 205, 20, TEX_WIDTH, TEX_HEIGHT); if (jutsuData.hasNatures() && jutsuData.hasSelectedJutsu()) { float ratioAfterUse = (chakraData.getCurrentValue() - chakraCost) / (float) chakraData.getMaxValue(); int selectedWidthAfterUse = (int) (width * ratioAfterUse); if (chakraCost <= chakraData.getCurrentValue()) { AbstractGui.blit(matrix, x, y, 0, 23, selectedWidthAfterUse, 4, TEX_WIDTH, TEX_HEIGHT); AbstractGui.drawCenteredString( matrix, hud.getFont(), "after: " + (chakraData.getCurrentValue() - chakraCost), 60, y + 30, 0x00CCFF); } else { AbstractGui.blit(matrix, x, y, 0, 23, width, 4, TEX_WIDTH, TEX_HEIGHT); AbstractGui.drawCenteredString( matrix, hud.getFont(), "insufficient chakra!", 60, y + 30, 0xFF0000); } } AbstractGui.drawCenteredString( matrix, hud.getFont(), chakraData.getCurrentValue() + " / " + chakraData.getMaxValue(), 60, y + 50, 0x00CCFF); matrix.popPose(); RenderSystem.disableBlend(); Here is the texture: this is weird because the red texture was drawn correctly on top of the other one.
  3. How so? A couple of trigonometric functions can't possibly affect performance.
  4. I am doing this so players can't cheat.
  5. I know about Minecraft.hitResult, but that is client-sided. How may I get the block the player is looking at from the server?
  6. You should change your types to "boolean", so you can't get problems like these in the future.
  7. I am calling it on the CLIENT. That method returns the World field of the entity. The server also gets a packet when this should be called, so playing it on the server could be possible.
  8. I am trying to play sounds with: playerEntity.getCommandSenderWorld().playSound(playerEntity, BlockPos.ZERO, ModSounds.ACTIVATE_JUTSU_BASIC.get(), SoundCategory.PLAYERS,1f, 1f); , called on the client. This is how my sounds are registered: [the logger gets called] the sounds.json file: { "activate_jutsu_basic": { "subtitle": "narutomod.subtitle.activate_jutsu_basic", "sounds": [ "narutomod:jutsu/activate_jutsu_basic" ] } } I aim for this:
  9. the mod looks like it's working now. But do remember to fix the structure, and use packets for synchronization.
  10. Actually, now that I look at this, there is another type called boolean, which is what you probably want.
  11. Also, your resourcelocations are broken. You cannot use capital letters in resource locations. For example, your caused forge to not load the mod. Replace it with puretitan in all occurences. Your NBT is failing to save because you did not assign a default value to the PureTitan boolean in the constructor, so the boolean is null. Coming from a C# background, I actually blame java for allowing booleans to be nullable.
  12. Also, your repo's structure is messed up. You missed the gradle files.
  13. Even though I have quite limited experience, why did you split your item registry into a package called "core"? that is confusing. It should be located where the rest of the item classes are, in common. Also, your PlayerSize class is in common. But the graphics transformations are client-sided. Let me explain the structure I use: Common package, for anything that is needed on both the client and server items Item classes Item registry class blocks Block classes Block registry class network Packet classes Network manager class Client package, for anything that can only run on the client gui overlay Overlay classes Overlay renderer and so on. You need to send a packet to other clients (tracking entities) when doing the transformation. See the forge documentation on Simple Channel.
  14. What happens if a player e.g teleports to another player which is using an ability? wouldn't that break the system?
  15. This answer does not help me. Is sending a packet to the server, then the server sending a packet to all the other clients ultimately the best way of doing it? Would it complicate rendering effects on other players? Has it been done before? How do I know which players to send the packet to (other players which can see the player executing the ability)?
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.