This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package speedytools.clientside.selections; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.state.IBlockState; | |
import net.minecraft.client.Minecraft; | |
import net.minecraft.client.renderer.*; | |
import net.minecraft.client.renderer.block.model.BakedQuad; | |
import net.minecraft.client.renderer.texture.DynamicTexture; | |
import net.minecraft.client.renderer.texture.TextureManager; | |
import net.minecraft.client.renderer.texture.TextureMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package info.ata4.minecraft.dragon.server.util; | |
import net.minecraft.client.entity.EntityPlayerSP; | |
import net.minecraft.entity.Entity; | |
import net.minecraft.entity.passive.EntityTameable; | |
import net.minecraft.util.AxisAlignedBB; | |
import net.minecraft.util.MovingObjectPosition; | |
import net.minecraft.util.Vec3; | |
import net.minecraft.world.World; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
GL11.glPushAttrib(GL11.GL_ENABLE_BIT); | |
GL11.glDepthMask(false); | |
GL11.glPushMatrix(); | |
GL11.glEnable(GL11.GL_BLEND); | |
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); | |
// just white |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package speedytools.common.utilities; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.properties.PropertyDirection; | |
import net.minecraft.block.state.IBlockState; | |
import net.minecraft.util.EnumFacing; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @author Nico Bergemann <barracuda415 at yahoo.de> | |
*/ | |
public class DragonBodyHelper extends EntityBodyHelper | |
{ | |
private EntityTameableDragon dragon; | |
private int turnTicks; | |
private int turnTicksLimit = 20; | |
private float lastRotationYawHead; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This code works properly (separate copy of each msg) | |
int dimension = sendingPlayer.dimension; | |
MinecraftServer minecraftServer = sendingPlayer.mcServer; | |
for (EntityPlayerMP player : (List<EntityPlayerMP>)minecraftServer.getConfigurationManager().playerEntityList) { | |
MessageToClient msg = new MessageToClient(nextID); // generate a fresh message for every player | |
if (dimension == player.dimension) { | |
simpleNetworkWrapper.sendTo(msg, player); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Breakpoint on IndexOutOfBoundsException | |
AbstractByteBuf:: | |
@Override | |
public ByteBuf readerIndex(int readerIndex) { | |
if (readerIndex < 0 || readerIndex > writerIndex) { | |
throw new IndexOutOfBoundsException(String.format( | |
"readerIndex: %d (expected: 0 <= readerIndex <= writerIndex(%d))", readerIndex, writerIndex)); | |
} | |
this.readerIndex = readerIndex; | |
return this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package racecheck; | |
import io.netty.buffer.ByteBuf; | |
import net.minecraft.client.Minecraft; | |
import net.minecraft.client.multiplayer.WorldClient; | |
import net.minecraft.util.EnumParticleTypes; | |
import net.minecraft.util.Vec3; | |
import net.minecraftforge.fml.common.FMLCommonHandler; | |
import net.minecraftforge.fml.common.Mod; | |
import net.minecraftforge.fml.common.Mod.EventHandler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---TestFrameworkMod.Java--------------------------------------------- | |
package testframework; | |
/** | |
* This class is just used to pass control to the appropriate "Proxy" class depending on whether the mod has been installed in a normal Minecraft Client or a Dedicated Server. | |
*/ | |
@Mod(modid="testframeworkmod", name="Forge Test Framework Mod", version="0.0.1") | |
@NetworkMod(clientSideRequired=true, serverSideRequired=false) | |
public class TestFrameworkMod { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package speedytools.client; | |
/** | |
* The purpose of this class is to intercept key presses (especially left and right mouse button clicks) and allow | |
* greater flexibility in responding to them. | |
* The class replaces KeyBindings in GameSettings. When interception is on: | |
* .isPressed() is overridden to return false so that the vanilla code never receives the clicks. | |
* .pressed is always false. | |
* The true .isPressed() and .pressed are available using .retrieveClick() and .isKeyDown() | |
* Usage: |