reformat
This commit is contained in:
parent
af93e51d29
commit
ec2dc742aa
|
@ -1,6 +1,6 @@
|
|||
package net.hoosiertransfer.Alfheim;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
|
||||
public interface IChunkLightingData {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package net.hoosiertransfer.Alfheim;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
|
@ -9,7 +9,8 @@ public interface ILightInfoProvider {
|
|||
|
||||
int alfheim$getLightFor(final IBlockAccess iBlockAccess, final EnumSkyBlock lightType, final BlockPos blockPos);
|
||||
|
||||
boolean alfheim$useNeighborBrightness(final EnumFacing facing, final IBlockAccess blockAccess, final BlockPos blockPos);
|
||||
boolean alfheim$useNeighborBrightness(final EnumFacing facing, final IBlockAccess blockAccess,
|
||||
final BlockPos blockPos);
|
||||
|
||||
int alfheim$getLightOpacity(final EnumFacing facing, final IBlockAccess blockAccess, final BlockPos blockPos);
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package net.hoosiertransfer.Alfheim;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
package net.hoosiertransfer.Alfheim;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public interface ILitBlock {
|
||||
int alfheim$getLightFor(final IBlockState blockState, final IBlockAccess blockAccess, final EnumSkyBlock lightType, final BlockPos blockPos);
|
||||
boolean alfheim$useNeighborBrightness(final IBlockState blockState, final EnumFacing facing, final IBlockAccess blockAccess, final BlockPos blockPos);
|
||||
int alfheim$getLightOpacity(final IBlockState blockState, final EnumFacing facing, final IBlockAccess blockAccess, final BlockPos blockPos);
|
||||
int alfheim$getLightFor(final IBlockState blockState, final IBlockAccess blockAccess, final EnumSkyBlock lightType,
|
||||
final BlockPos blockPos);
|
||||
|
||||
boolean alfheim$useNeighborBrightness(final IBlockState blockState, final EnumFacing facing,
|
||||
final IBlockAccess blockAccess, final BlockPos blockPos);
|
||||
|
||||
int alfheim$getLightOpacity(final IBlockState blockState, final EnumFacing facing, final IBlockAccess blockAccess,
|
||||
final BlockPos blockPos);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package net.hoosiertransfer.Alfheim.lighting;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class LightUtil {
|
||||
public static int getLightValueForState(final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos blockPos) {
|
||||
public static int getLightValueForState(final IBlockState blockState, final IBlockAccess blockAccess,
|
||||
final BlockPos blockPos) {
|
||||
return blockState.getLightValue(blockAccess, blockPos);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ import net.hoosiertransfer.Alfheim.util.DeduplicatedLongQueue;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.profiler.Profiler;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3i;
|
||||
import net.minecraft.util.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
import net.minecraft.util.math.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
|
|
@ -12,9 +12,8 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityArmorStand;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class CullTask implements Runnable {
|
||||
public boolean requestCull = false;
|
||||
|
@ -42,22 +41,28 @@ public class CullTask implements Runnable {
|
|||
// try {
|
||||
// Thread.sleep(Config.SleepDuration);
|
||||
|
||||
// if (Config.enableCulling && client.theWorld != null && client.thePlayer != null && client.thePlayer.ticksExisted > 0 && client.getRenderViewEntity() != null) {
|
||||
// if (Config.enableCulling && client.theWorld != null && client.thePlayer !=
|
||||
// null && client.thePlayer.ticksExisted > 0 && client.getRenderViewEntity() !=
|
||||
// null) {
|
||||
// Vec3 cameraMC = getCameraPos();
|
||||
// if (requestCull || !(cameraMC.xCoord == lastPos.x && cameraMC.yCoord == lastPos.y && cameraMC.zCoord == lastPos.z)) {
|
||||
// if (requestCull || !(cameraMC.xCoord == lastPos.x && cameraMC.yCoord ==
|
||||
// lastPos.y && cameraMC.zCoord == lastPos.z)) {
|
||||
// long start = System.currentTimeMillis();
|
||||
// requestCull = false;
|
||||
// lastPos.set(cameraMC.xCoord, cameraMC.yCoord, cameraMC.zCoord);
|
||||
// Vec3d camera = lastPos;
|
||||
// culling.resetCache();
|
||||
// boolean noCulling = client.thePlayer.isSpectator() || client.gameSettings.thirdPersonView != 0;
|
||||
// Iterator<TileEntity> iterator = client.theWorld.loadedTileEntityList.iterator();
|
||||
// boolean noCulling = client.thePlayer.isSpectator() ||
|
||||
// client.gameSettings.thirdPersonView != 0;
|
||||
// Iterator<TileEntity> iterator =
|
||||
// client.theWorld.loadedTileEntityList.iterator();
|
||||
// TileEntity entry;
|
||||
// while(iterator.hasNext()) {
|
||||
// try {
|
||||
// entry = iterator.next();
|
||||
// } catch(NullPointerException | ConcurrentModificationException ex) {
|
||||
// break; // We are not synced to the main thread, so NPE's/CME are allowed here and way less
|
||||
// break; // We are not synced to the main thread, so NPE's/CME are allowed here
|
||||
// and way less
|
||||
// // overhead probably than trying to sync stuff up for no really good reason
|
||||
// }
|
||||
// if (unCullable.contains(entry.getBlockType().getUnlocalizedName())) {
|
||||
|
@ -69,7 +74,8 @@ public class CullTask implements Runnable {
|
|||
// continue;
|
||||
// }
|
||||
// BlockPos pos = entry.getPos();
|
||||
// if(pos.distanceSq(cameraMC.xCoord, cameraMC.yCoord, cameraMC.zCoord) < 64*64) { // 64 is the fixed max tile view distance
|
||||
// if(pos.distanceSq(cameraMC.xCoord, cameraMC.yCoord, cameraMC.zCoord) < 64*64)
|
||||
// { // 64 is the fixed max tile view distance
|
||||
// aabbMin.set(pos.getX(), pos.getY(), pos.getZ());
|
||||
// aabbMax.set(pos.getX()+1d, pos.getY()+1d, pos.getZ()+1d);
|
||||
// boolean visible = culling.isAABBVisible(aabbMin, aabbMax, camera);
|
||||
|
@ -83,7 +89,8 @@ public class CullTask implements Runnable {
|
|||
// try {
|
||||
// entity = iterable.next();
|
||||
// } catch(NullPointerException | ConcurrentModificationException ex) {
|
||||
// break; // We are not synced to the main thread, so NPE's/CME are allowed here and way less
|
||||
// break; // We are not synced to the main thread, so NPE's/CME are allowed here
|
||||
// and way less
|
||||
// // overhead probably than trying to sync stuff up for no really good reason
|
||||
// }
|
||||
// if (entity == null) {
|
||||
|
@ -94,12 +101,16 @@ public class CullTask implements Runnable {
|
|||
// entity.setCulled(false);
|
||||
// continue;
|
||||
// }
|
||||
// if(entity.getPositionVector().squareDistanceTo(cameraMC) > Config.tracingDistance * Config.tracingDistance) {
|
||||
// entity.setCulled(false); // If your entity view distance is larger than tracingDistance just render it
|
||||
// if(entity.getPositionVector().squareDistanceTo(cameraMC) >
|
||||
// Config.tracingDistance * Config.tracingDistance) {
|
||||
// entity.setCulled(false); // If your entity view distance is larger than
|
||||
// tracingDistance just render it
|
||||
// continue;
|
||||
// }
|
||||
// AxisAlignedBB boundingBox = entity.getEntityBoundingBox();
|
||||
// if(boundingBox.maxX - boundingBox.minX > hitboxLimit || boundingBox.maxY - boundingBox.minY > hitboxLimit || boundingBox.maxZ - boundingBox.minZ > hitboxLimit) {
|
||||
// if(boundingBox.maxX - boundingBox.minX > hitboxLimit || boundingBox.maxY -
|
||||
// boundingBox.minY > hitboxLimit || boundingBox.maxZ - boundingBox.minZ >
|
||||
// hitboxLimit) {
|
||||
// entity.setCulled(false); // To big to bother to cull
|
||||
// continue;
|
||||
// }
|
||||
|
@ -119,7 +130,7 @@ public class CullTask implements Runnable {
|
|||
// System.out.println("Culling thread stopped");
|
||||
}
|
||||
|
||||
private Vec3 getCameraPos() {
|
||||
private net.minecraft.util.math.Vec3d getCameraPos() {
|
||||
if (client.gameSettings.thirdPersonView == 0) {
|
||||
return client.thePlayer.getPositionEyes(0);
|
||||
}
|
||||
|
@ -127,7 +138,9 @@ public class CullTask implements Runnable {
|
|||
}
|
||||
|
||||
private boolean isSkippableArmorstand(Entity entity) {
|
||||
if (!Config.skipMarkerArmorStands) return false;
|
||||
return entity instanceof EntityArmorStand && ((EntityArmorStand) entity).func_181026_s(); // i think this is the marker flag
|
||||
if (!Config.skipMarkerArmorStands)
|
||||
return false;
|
||||
return entity instanceof EntityArmorStand && ((EntityArmorStand) entity).func_181026_s(); // i think this is the
|
||||
// marker flag
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import com.logisticscraft.occlusionculling.DataProvider;
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class Provider implements DataProvider {
|
||||
private final Minecraft client = Minecraft.getMinecraft();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package net.hoosiertransfer.Sodium;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.biome.BiomeColorHelper;
|
||||
import net.minecraft.util.BlockPos;
|
||||
|
||||
public interface SodiumBlockAccess extends IBlockAccess {
|
||||
int getBlockTint(BlockPos pos, BiomeColorHelper.ColorResolver resolver);
|
||||
|
|
|
@ -21,8 +21,8 @@ import net.minecraft.client.audio.SoundPoolEntry;
|
|||
import net.minecraft.client.settings.GameSettings;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2022-2023 lax1dude, hoosiertransfer, ayunami2000. All Rights
|
||||
|
|
|
@ -34,8 +34,8 @@ import net.minecraft.client.resources.data.PackMetadataSectionSerializer;
|
|||
import net.minecraft.client.resources.data.TextureMetadataSection;
|
||||
import net.minecraft.client.resources.data.TextureMetadataSectionSerializer;
|
||||
import net.minecraft.network.ServerStatusResponse;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.Style;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.world.gen.ChunkProviderSettings;
|
||||
|
||||
/**
|
||||
|
@ -137,8 +137,8 @@ public class JSONTypeProvider {
|
|||
|
||||
static {
|
||||
|
||||
registerType(IChatComponent.class, new IChatComponent.Serializer());
|
||||
registerType(ChatStyle.class, new ChatStyle.Serializer());
|
||||
registerType(ITextComponent.class, new ITextComponent.Serializer());
|
||||
registerType(Style.class, new Style.Serializer());
|
||||
registerType(ServerStatusResponse.class, new ServerStatusResponse.Serializer());
|
||||
registerType(ServerStatusResponse.MinecraftProtocolVersionIdentifier.class,
|
||||
new ServerStatusResponse.MinecraftProtocolVersionIdentifier.Serializer());
|
||||
|
|
|
@ -4,20 +4,27 @@ import net.lax1dude.eaglercraft.v1_8.opengl.InstancedParticleRenderer;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.hoosiertransfer.Config;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2022 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
@ -48,34 +55,44 @@ public class AcceleratedEffectRenderer implements IAcceleratedParticleEngine {
|
|||
|
||||
@Override
|
||||
public void draw(float texCoordWidth, float texCoordHeight) {
|
||||
if (!Config.renderParticles()) return;
|
||||
if (!Config.renderParticles())
|
||||
return;
|
||||
InstancedParticleRenderer.render(texCoordWidth, texCoordHeight, 0.0625f, f1, f5, f2, f3, f4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawParticle(Entity entityIn, int particleIndexX, int particleIndexY, int lightMapData,
|
||||
int texSize, float particleSize, float r, float g, float b, float a) {
|
||||
if (!Config.renderParticles()) return;
|
||||
float xx = (float) (entityIn.prevPosX + (entityIn.posX - entityIn.prevPosX) * (double) partialTicks - EntityFX.interpPosX);
|
||||
float yy = (float) (entityIn.prevPosY + (entityIn.posY - entityIn.prevPosY) * (double) partialTicks - EntityFX.interpPosY);
|
||||
float zz = (float) (entityIn.prevPosZ + (entityIn.posZ - entityIn.prevPosZ) * (double) partialTicks - EntityFX.interpPosZ);
|
||||
if (!Config.renderParticles())
|
||||
return;
|
||||
float xx = (float) (entityIn.prevPosX + (entityIn.posX - entityIn.prevPosX) * (double) partialTicks
|
||||
- EntityFX.interpPosX);
|
||||
float yy = (float) (entityIn.prevPosY + (entityIn.posY - entityIn.prevPosY) * (double) partialTicks
|
||||
- EntityFX.interpPosY);
|
||||
float zz = (float) (entityIn.prevPosZ + (entityIn.posZ - entityIn.prevPosZ) * (double) partialTicks
|
||||
- EntityFX.interpPosZ);
|
||||
drawParticle(xx, yy, zz, particleIndexX, particleIndexY, lightMapData, texSize, particleSize, r, g, b, a);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawParticle(Entity entityIn, int particleIndexX, int particleIndexY, int lightMapData,
|
||||
int texSize, float particleSize, int rgba) {
|
||||
if (!Config.renderParticles()) return;
|
||||
float xx = (float) (entityIn.prevPosX + (entityIn.posX - entityIn.prevPosX) * (double) partialTicks - EntityFX.interpPosX);
|
||||
float yy = (float) (entityIn.prevPosY + (entityIn.posY - entityIn.prevPosY) * (double) partialTicks - EntityFX.interpPosY);
|
||||
float zz = (float) (entityIn.prevPosZ + (entityIn.posZ - entityIn.prevPosZ) * (double) partialTicks - EntityFX.interpPosZ);
|
||||
if (!Config.renderParticles())
|
||||
return;
|
||||
float xx = (float) (entityIn.prevPosX + (entityIn.posX - entityIn.prevPosX) * (double) partialTicks
|
||||
- EntityFX.interpPosX);
|
||||
float yy = (float) (entityIn.prevPosY + (entityIn.posY - entityIn.prevPosY) * (double) partialTicks
|
||||
- EntityFX.interpPosY);
|
||||
float zz = (float) (entityIn.prevPosZ + (entityIn.posZ - entityIn.prevPosZ) * (double) partialTicks
|
||||
- EntityFX.interpPosZ);
|
||||
drawParticle(xx, yy, zz, particleIndexX, particleIndexY, lightMapData, texSize, particleSize, rgba);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawParticle(float posX, float posY, float posZ, int particleIndexX, int particleIndexY,
|
||||
int lightMapData, int texSize, float particleSize, float r, float g, float b, float a) {
|
||||
if (!Config.renderParticles()) return;
|
||||
if (!Config.renderParticles())
|
||||
return;
|
||||
InstancedParticleRenderer.appendParticle(posX, posY, posZ, particleIndexX, particleIndexY, lightMapData & 0xFF,
|
||||
(lightMapData >> 16) & 0xFF, (int) (particleSize * 16.0f), texSize, r, g, b, a);
|
||||
}
|
||||
|
@ -83,7 +100,8 @@ public class AcceleratedEffectRenderer implements IAcceleratedParticleEngine {
|
|||
@Override
|
||||
public void drawParticle(float posX, float posY, float posZ, int particleIndexX, int particleIndexY,
|
||||
int lightMapData, int texSize, float particleSize, int rgba) {
|
||||
if (!Config.renderParticles()) return;
|
||||
if (!Config.renderParticles())
|
||||
return;
|
||||
InstancedParticleRenderer.appendParticle(posX, posY, posZ, particleIndexX, particleIndexY, lightMapData & 0xFF,
|
||||
(lightMapData >> 16) & 0xFF, (int) (particleSize * 16.0f), texSize, rgba);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import net.lax1dude.eaglercraft.v1_8.opengl.StreamBuffer.StreamBufferInstance;
|
|||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
import net.lax1dude.eaglercraft.v1_8.vector.Vector4f;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import static net.lax1dude.eaglercraft.v1_8.opengl.FixedFunctionShader.FixedFunctionState.*;
|
||||
import static net.lax1dude.eaglercraft.v1_8.opengl.FixedFunctionShader.FixedFunctionConstants.*;
|
||||
|
|
|
@ -12,7 +12,7 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformBufferFunctions;
|
|||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.vector.Vector3f;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2022-2023 lax1dude, hoosiertransfer, ayunami2000. All Rights
|
||||
|
|
|
@ -22,19 +22,26 @@ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
|||
import net.lax1dude.eaglercraft.v1_8.vector.Vector3f;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2023 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
@ -126,7 +133,8 @@ public class CloudRenderWorker {
|
|||
ByteBuffer cloudNoiseDatBuffer = EagRuntime.allocateByteBuffer(cloudNoiseDat.length);
|
||||
cloudNoiseDatBuffer.put(cloudNoiseDat);
|
||||
cloudNoiseDatBuffer.flip();
|
||||
_wglTexImage2D(GL_TEXTURE_2D, 0, _GL_R8, cloudNoiseW, cloudNoiseH, 0, GL_RED, GL_UNSIGNED_BYTE, cloudNoiseDatBuffer);
|
||||
_wglTexImage2D(GL_TEXTURE_2D, 0, _GL_R8, cloudNoiseW, cloudNoiseH, 0, GL_RED, GL_UNSIGNED_BYTE,
|
||||
cloudNoiseDatBuffer);
|
||||
EagRuntime.freeByteBuffer(cloudNoiseDatBuffer);
|
||||
|
||||
cloud3DSamplesTexture = GlStateManager.generateTexture();
|
||||
|
@ -143,7 +151,8 @@ public class CloudRenderWorker {
|
|||
for (int i = 0; i < cloud3DSamplesTextureSizeZ; ++i) {
|
||||
cloud3DSamplesSlices[i] = _wglCreateFramebuffer();
|
||||
_wglBindFramebuffer(_GL_FRAMEBUFFER, cloud3DSamplesSlices[i]);
|
||||
_wglFramebufferTextureLayer(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, EaglercraftGPU.getNativeTexture(cloud3DSamplesTexture), 0, i);
|
||||
_wglFramebufferTextureLayer(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0,
|
||||
EaglercraftGPU.getNativeTexture(cloud3DSamplesTexture), 0, i);
|
||||
}
|
||||
|
||||
GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
@ -156,8 +165,10 @@ public class CloudRenderWorker {
|
|||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, i == 3 ? GL_LINEAR : GL_NEAREST);
|
||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, i == 3 ? GL_LINEAR : GL_NEAREST);
|
||||
EaglercraftGPU.createFramebufferHDR16FTexture(GL_TEXTURE_2D, 0, cloudParaboloidTextureSize, cloudParaboloidTextureSize, GL_RGBA, true);
|
||||
_wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, EaglercraftGPU.getNativeTexture(cloudNoiseSampleParaboloidTexture[i]), 0);
|
||||
EaglercraftGPU.createFramebufferHDR16FTexture(GL_TEXTURE_2D, 0, cloudParaboloidTextureSize,
|
||||
cloudParaboloidTextureSize, GL_RGBA, true);
|
||||
_wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
|
||||
EaglercraftGPU.getNativeTexture(cloudNoiseSampleParaboloidTexture[i]), 0);
|
||||
GlStateManager.clear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
|
@ -172,7 +183,8 @@ public class CloudRenderWorker {
|
|||
cloudNoiseDatBuffer = EagRuntime.allocateByteBuffer(cloudShapeTexture.length);
|
||||
cloudNoiseDatBuffer.put(cloudShapeTexture);
|
||||
cloudNoiseDatBuffer.flip();
|
||||
_wglTexImage3D(GL_TEXTURE_3D, 0, _GL_R8, 32, 16, 24, 0, GL_RED, GL_UNSIGNED_BYTE, (ByteBuffer) cloudNoiseDatBuffer);
|
||||
_wglTexImage3D(GL_TEXTURE_3D, 0, _GL_R8, 32, 16, 24, 0, GL_RED, GL_UNSIGNED_BYTE,
|
||||
(ByteBuffer) cloudNoiseDatBuffer);
|
||||
EagRuntime.freeByteBuffer(cloudNoiseDatBuffer);
|
||||
|
||||
shader_clouds_noise3d = PipelineShaderCloudsNoise3D.compile();
|
||||
|
@ -193,7 +205,8 @@ public class CloudRenderWorker {
|
|||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
_wglTexImage2D(GL_TEXTURE_2D, 0, _GL_R8, 1, 1, 0, GL_RED, GL_UNSIGNED_BYTE, (ByteBuffer) null);
|
||||
_wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, EaglercraftGPU.getNativeTexture(cloudOcclusionTexture), 0);
|
||||
_wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
|
||||
EaglercraftGPU.getNativeTexture(cloudOcclusionTexture), 0);
|
||||
}
|
||||
|
||||
static void setPosition(float x, float y, float z) {
|
||||
|
@ -224,7 +237,8 @@ public class CloudRenderWorker {
|
|||
float rain = wc.getRainStrength(0.0f);
|
||||
if (cloudRenderProgress == 0) {
|
||||
shader_clouds_noise3d.useProgram();
|
||||
_wglUniform2f(shader_clouds_noise3d.uniforms.u_textureSize2f, 1.0f / cloud3DSamplesTextureSizeX, 1.0f / cloud3DSamplesTextureSizeY);
|
||||
_wglUniform2f(shader_clouds_noise3d.uniforms.u_textureSize2f, 1.0f / cloud3DSamplesTextureSizeX,
|
||||
1.0f / cloud3DSamplesTextureSizeY);
|
||||
float m = (float) ((millis % 1200000l) * 0.00002);
|
||||
_wglUniform3f(shader_clouds_noise3d.uniforms.u_cloudMovement3f, m, 0.0f, m);// 2.213f, 0.0f, 2.213f);
|
||||
|
||||
|
@ -255,7 +269,8 @@ public class CloudRenderWorker {
|
|||
_wglUniform1f(shader_clouds_sample.uniforms.u_cloudTimer1f, 0.0f);
|
||||
_wglUniform3f(shader_clouds_sample.uniforms.u_cloudOffset3f, renderViewX, renderViewY, renderViewZ);
|
||||
Vector3f currentSunAngle = DeferredStateManager.currentSunLightAngle;
|
||||
_wglUniform3f(shader_clouds_sample.uniforms.u_sunDirection3f, -currentSunAngle.x, -currentSunAngle.y, -currentSunAngle.z);
|
||||
_wglUniform3f(shader_clouds_sample.uniforms.u_sunDirection3f, -currentSunAngle.x, -currentSunAngle.y,
|
||||
-currentSunAngle.z);
|
||||
currentSunAngle = tmpVector1;
|
||||
currentSunAngle.set(DeferredStateManager.currentSunLightColor);
|
||||
float luma = currentSunAngle.x * 0.299f + currentSunAngle.y * 0.587f + currentSunAngle.z * 0.114f;
|
||||
|
@ -271,11 +286,15 @@ public class CloudRenderWorker {
|
|||
float cloudDensityTimer = (float) ((System.currentTimeMillis() % 10000000l) * 0.001);
|
||||
cloudDensityTimer += MathHelper.sin(cloudDensityTimer * 1.5f) * 1.5f;
|
||||
float x = cloudDensityTimer * 0.004f;
|
||||
float f1 = MathHelper.sin(x + 0.322f) * 0.544f + MathHelper.sin(x * 4.5f + 1.843f) * 0.69f + MathHelper.sin(x * 3.4f + 0.8f) * 0.6f + MathHelper.sin(x * 6.1f + 1.72f) * 0.7f;
|
||||
float f1 = MathHelper.sin(x + 0.322f) * 0.544f + MathHelper.sin(x * 4.5f + 1.843f) * 0.69f
|
||||
+ MathHelper.sin(x * 3.4f + 0.8f) * 0.6f + MathHelper.sin(x * 6.1f + 1.72f) * 0.7f;
|
||||
x = cloudDensityTimer * 0.002f;
|
||||
float f2 = MathHelper.cos(x + 2.7f) + MathHelper.cos(x * 1.28f + 1.3f) * 0.4f + MathHelper.cos(x * 4.0f + 2.5f) * 0.3f + MathHelper.cos(x * 2.3f + 1.07f);
|
||||
float f2 = MathHelper.cos(x + 2.7f) + MathHelper.cos(x * 1.28f + 1.3f) * 0.4f
|
||||
+ MathHelper.cos(x * 4.0f + 2.5f) * 0.3f + MathHelper.cos(x * 2.3f + 1.07f);
|
||||
float rain2 = rain + wc.getThunderStrength(0.0f);
|
||||
_wglUniform4f(shader_clouds_sample.uniforms.u_densityModifier4f, 0.015f + f1 * 0.0021f * (1.0f - rain2 * 0.35f) + rain2 * 0.00023f, 0.0325f, -0.0172f + f2 * 0.00168f * (1.0f - rain2 * 0.35f) + rain * 0.0015f, 0.0f);
|
||||
_wglUniform4f(shader_clouds_sample.uniforms.u_densityModifier4f,
|
||||
0.015f + f1 * 0.0021f * (1.0f - rain2 * 0.35f) + rain2 * 0.00023f, 0.0325f,
|
||||
-0.0172f + f2 * 0.00168f * (1.0f - rain2 * 0.35f) + rain * 0.0015f, 0.0f);
|
||||
}
|
||||
|
||||
if (cloudRenderProgress < 32 && currentCloudStep > cloudRenderProgress) {
|
||||
|
@ -330,7 +349,8 @@ public class CloudRenderWorker {
|
|||
matrixCopyBuffer.put(mat.m21);
|
||||
matrixCopyBuffer.flip();
|
||||
shader_clouds_shapes.useProgram();
|
||||
_wglUniformMatrix3x2fv(shader_clouds_shapes.uniforms.u_transformMatrix3x2f, false, matrixCopyBuffer);
|
||||
_wglUniformMatrix3x2fv(shader_clouds_shapes.uniforms.u_transformMatrix3x2f, false,
|
||||
matrixCopyBuffer);
|
||||
_wglUniform1f(shader_clouds_shapes.uniforms.u_textureLod1f, 0.0f);
|
||||
_wglUniform2f(shader_clouds_shapes.uniforms.u_sampleWeights2f, 0.35f, 0.55f);
|
||||
}
|
||||
|
@ -341,7 +361,8 @@ public class CloudRenderWorker {
|
|||
shader_clouds_noise3d.useProgram();
|
||||
|
||||
_wglBindFramebuffer(_GL_FRAMEBUFFER, cloud3DSamplesSlices[ccl]);
|
||||
_wglUniform1f(shader_clouds_noise3d.uniforms.u_textureSlice1f, (float)(ccl / (float)cloud3DSamplesTextureSizeZ));
|
||||
_wglUniform1f(shader_clouds_noise3d.uniforms.u_textureSlice1f,
|
||||
(float) (ccl / (float) cloud3DSamplesTextureSizeZ));
|
||||
|
||||
DrawUtils.drawStandardQuad2D();
|
||||
|
||||
|
@ -349,7 +370,8 @@ public class CloudRenderWorker {
|
|||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL_ONE, GL_SRC_ALPHA);
|
||||
shader_clouds_shapes.useProgram();
|
||||
_wglUniform1f(shader_clouds_shapes.uniforms.u_textureLevel1f, (float)(ccl - shapePosZ + 0.5f) / (float)shapeSizeZ);
|
||||
_wglUniform1f(shader_clouds_shapes.uniforms.u_textureLevel1f,
|
||||
(float) (ccl - shapePosZ + 0.5f) / (float) shapeSizeZ);
|
||||
GlStateManager.bindTexture3D(cloudSpecialShapeTexture);
|
||||
DrawUtils.drawStandardQuad2D();
|
||||
GlStateManager.disableBlend();
|
||||
|
@ -358,14 +380,16 @@ public class CloudRenderWorker {
|
|||
}
|
||||
|
||||
_wglBindFramebuffer(_GL_FRAMEBUFFER, cloud3DSamplesSlices[ccl + 1]);
|
||||
_wglUniform1f(shader_clouds_noise3d.uniforms.u_textureSlice1f, (float)((ccl + 1) / (float)cloud3DSamplesTextureSizeZ));
|
||||
_wglUniform1f(shader_clouds_noise3d.uniforms.u_textureSlice1f,
|
||||
(float) ((ccl + 1) / (float) cloud3DSamplesTextureSizeZ));
|
||||
|
||||
DrawUtils.drawStandardQuad2D();
|
||||
|
||||
if (drawShape && ccl + 1 < shapePosZ + shapeSizeZ) {
|
||||
GlStateManager.enableBlend();
|
||||
shader_clouds_shapes.useProgram();
|
||||
_wglUniform1f(shader_clouds_shapes.uniforms.u_textureLevel1f, (float)((ccl + 1) - shapePosZ + 0.5f) / (float)shapeSizeZ);
|
||||
_wglUniform1f(shader_clouds_shapes.uniforms.u_textureLevel1f,
|
||||
(float) ((ccl + 1) - shapePosZ + 0.5f) / (float) shapeSizeZ);
|
||||
GlStateManager.bindTexture3D(cloudSpecialShapeTexture);
|
||||
DrawUtils.drawStandardQuad2D();
|
||||
GlStateManager.disableBlend();
|
||||
|
@ -386,7 +410,8 @@ public class CloudRenderWorker {
|
|||
GlStateManager.enableBlend();
|
||||
GlStateManager.tryBlendFuncSeparate(GL_DST_ALPHA, GL_ONE, GL_DST_ALPHA, GL_ZERO);
|
||||
|
||||
for(int i = cloudRenderProgress > 32 ? cloudRenderProgress - 32 : 0, j = currentCloudStep - 31; i < j; ++i) {
|
||||
for (int i = cloudRenderProgress > 32 ? cloudRenderProgress - 32 : 0,
|
||||
j = currentCloudStep - 31; i < j; ++i) {
|
||||
if (i == 0) {
|
||||
GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
GlStateManager.clear(GL_COLOR_BUFFER_BIT);
|
||||
|
@ -415,7 +440,8 @@ public class CloudRenderWorker {
|
|||
GlStateManager.viewport(0, 0, cloudParaboloidTextureSize, cloudParaboloidTextureSize);
|
||||
|
||||
float fadeFactor = cloudProgress / (float) cloudRenderPeriod;
|
||||
if(fadeFactor > 1.0f) fadeFactor = 1.0f;
|
||||
if (fadeFactor > 1.0f)
|
||||
fadeFactor = 1.0f;
|
||||
GlStateManager.setActiveTexture(GL_TEXTURE0);
|
||||
GlStateManager.bindTexture(cloudNoiseSampleParaboloidTexture[(cloudRenderPhase + 1) % 3]);
|
||||
TextureCopyUtil.blitTexture();
|
||||
|
@ -565,8 +591,12 @@ public class CloudRenderWorker {
|
|||
float dy = MathHelper.sin(-shapeRotate * 0.0174532f);
|
||||
shapePosX += (int) (dx * 10.0f * dt);
|
||||
shapePosY -= (int) (dy * 10.0f * dt);
|
||||
if(MathHelper.abs(shapePosX - renderViewX * playerCoordsNoiseMapScale - cloud3DSamplesTextureSizeX * 0.5f) > 300.0f ||
|
||||
MathHelper.abs(shapePosY - renderViewZ * playerCoordsNoiseMapScale - cloud3DSamplesTextureSizeY * 0.5f) > 300.0f) {
|
||||
if (MathHelper
|
||||
.abs(shapePosX - renderViewX * playerCoordsNoiseMapScale
|
||||
- cloud3DSamplesTextureSizeX * 0.5f) > 300.0f
|
||||
||
|
||||
MathHelper.abs(shapePosY - renderViewZ * playerCoordsNoiseMapScale
|
||||
- cloud3DSamplesTextureSizeY * 0.5f) > 300.0f) {
|
||||
nextShapeAppearance = millis + 300000l + rand.nextInt(1500000);
|
||||
isDrawingCloudShapes = false;
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
|||
import net.lax1dude.eaglercraft.v1_8.vector.Vector3f;
|
||||
import net.lax1dude.eaglercraft.v1_8.vector.Vector4f;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||
|
||||
|
|
|
@ -56,9 +56,9 @@ import net.minecraft.client.renderer.texture.TextureManager;
|
|||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||
import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*;
|
||||
|
|
|
@ -15,7 +15,7 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderA
|
|||
import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2023 lax1dude. All Rights Reserved.
|
||||
|
|
|
@ -15,7 +15,7 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderA
|
|||
import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2023 lax1dude. All Rights Reserved.
|
||||
|
|
|
@ -19,19 +19,26 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderL
|
|||
import net.lax1dude.eaglercraft.v1_8.vector.Matrix3f;
|
||||
import net.lax1dude.eaglercraft.v1_8.vector.Vector3f;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2023 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
@ -255,12 +262,14 @@ public class LensFlareMeshRenderer {
|
|||
copyBuffer.putFloat(ty + th);
|
||||
}
|
||||
|
||||
static void pushGhostQuadAbberated(ByteBuffer copyBuffer, float offset, float scale, int sprite, float r, float g, float b, float a) {
|
||||
static void pushGhostQuadAbberated(ByteBuffer copyBuffer, float offset, float scale, int sprite, float r, float g,
|
||||
float b, float a) {
|
||||
pushGhostQuad(copyBuffer, offset, scale, sprite, 0.0f, g, b, a);
|
||||
pushGhostQuad(copyBuffer, offset + 0.005f, scale, sprite, r, 0.0f, 0.0f, a);
|
||||
}
|
||||
|
||||
static void pushGhostQuad(ByteBuffer copyBuffer, float offset, float scale, int sprite, float r, float g, float b, float a) {
|
||||
static void pushGhostQuad(ByteBuffer copyBuffer, float offset, float scale, int sprite, float r, float g, float b,
|
||||
float a) {
|
||||
copyBuffer.putFloat(offset);
|
||||
copyBuffer.putFloat(scale);
|
||||
copyBuffer.putFloat(0.0f);
|
||||
|
@ -298,7 +307,8 @@ public class LensFlareMeshRenderer {
|
|||
tmpMat.m20 = sunScreenX;
|
||||
tmpMat.m21 = sunScreenY;
|
||||
|
||||
float rotation = sunScreenX * sunScreenX * Math.signum(sunScreenX) + sunScreenY * sunScreenY * Math.signum(sunScreenY);
|
||||
float rotation = sunScreenX * sunScreenX * Math.signum(sunScreenX)
|
||||
+ sunScreenY * sunScreenY * Math.signum(sunScreenY);
|
||||
|
||||
tmpMat2.setIdentity();
|
||||
tmpMat2.m00 = MathHelper.cos(rotation);
|
||||
|
|
|
@ -2,19 +2,26 @@ package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture;
|
|||
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2023 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
@ -27,7 +34,8 @@ public class TextureClockPBRImpl extends EaglerTextureAtlasSpritePBR {
|
|||
super(spriteName);
|
||||
}
|
||||
|
||||
public void updateAnimationPBR(IFramebufferGL[] copyColorFramebuffer, IFramebufferGL[] copyMaterialFramebuffer, int materialTexOffset) {
|
||||
public void updateAnimationPBR(IFramebufferGL[] copyColorFramebuffer, IFramebufferGL[] copyMaterialFramebuffer,
|
||||
int materialTexOffset) {
|
||||
if (!this.frameTextureDataPBR[0].isEmpty()) {
|
||||
Minecraft minecraft = Minecraft.getMinecraft();
|
||||
double d0 = 0.0;
|
||||
|
@ -53,7 +61,8 @@ public class TextureClockPBRImpl extends EaglerTextureAtlasSpritePBR {
|
|||
this.smoothParam1 += this.smoothParam2;
|
||||
|
||||
int i, frameCount = this.frameTextureDataPBR[0].size();
|
||||
for (i = (int) ((this.smoothParam1 + 1.0) * frameCount) % frameCount; i < 0; i = (i + frameCount) % frameCount) {
|
||||
for (i = (int) ((this.smoothParam1 + 1.0) * frameCount) % frameCount; i < 0; i = (i + frameCount)
|
||||
% frameCount) {
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,21 +2,28 @@ package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture;
|
|||
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2023 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
@ -29,13 +36,16 @@ public class TextureCompassPBRImpl extends EaglerTextureAtlasSpritePBR {
|
|||
super(spriteName);
|
||||
}
|
||||
|
||||
public void updateAnimationPBR(IFramebufferGL[] copyColorFramebuffer, IFramebufferGL[] copyMaterialFramebuffer, int materialOffset) {
|
||||
public void updateAnimationPBR(IFramebufferGL[] copyColorFramebuffer, IFramebufferGL[] copyMaterialFramebuffer,
|
||||
int materialOffset) {
|
||||
Minecraft minecraft = Minecraft.getMinecraft();
|
||||
if (minecraft.theWorld != null && minecraft.thePlayer != null) {
|
||||
this.updateCompassPBR(minecraft.theWorld, minecraft.thePlayer.posX, minecraft.thePlayer.posZ,
|
||||
(double) minecraft.thePlayer.rotationYaw, false, copyColorFramebuffer, copyMaterialFramebuffer, materialOffset);
|
||||
(double) minecraft.thePlayer.rotationYaw, false, copyColorFramebuffer, copyMaterialFramebuffer,
|
||||
materialOffset);
|
||||
} else {
|
||||
this.updateCompassPBR((World) null, 0.0, 0.0, 0.0, true, copyColorFramebuffer, copyMaterialFramebuffer, materialOffset);
|
||||
this.updateCompassPBR((World) null, 0.0, 0.0, 0.0, true, copyColorFramebuffer, copyMaterialFramebuffer,
|
||||
materialOffset);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
|||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ArrayListSerial;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ListSerial;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2023-2024 lax1dude. All Rights Reserved.
|
||||
|
|
|
@ -18,7 +18,7 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.program.DynamicLig
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2024 lax1dude. All Rights Reserved.
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
|||
import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
import net.minecraft.client.particle.EffectRenderer;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2024 lax1dude. All Rights Reserved.
|
||||
|
|
|
@ -22,7 +22,7 @@ import net.minecraft.init.Items;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
|
||||
|
|
|
@ -23,9 +23,9 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.gui.GuiDisconnected;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.multiplayer.GuiConnecting;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2022-2023 lax1dude, hoosiertransfer, ayunami2000. All Rights
|
||||
|
@ -135,7 +135,7 @@ public class ConnectionHandshake {
|
|||
di.read(dat);
|
||||
String msg = new String(dat, StandardCharsets.UTF_8);
|
||||
|
||||
mc.displayGuiScreen(new GuiDisconnected(ret, "connect.failed", new ChatComponentText(msg)));
|
||||
mc.displayGuiScreen(new GuiDisconnected(ret, "connect.failed", new TextComponentString(msg)));
|
||||
|
||||
return false;
|
||||
} else if (type == HandshakePacketTypes.PROTOCOL_SERVER_VERSION) {
|
||||
|
@ -144,7 +144,7 @@ public class ConnectionHandshake {
|
|||
if (serverVers != protocolV2 && serverVers != protocolV3) {
|
||||
logger.info("Incompatible server version: {}", serverVers);
|
||||
mc.displayGuiScreen(new GuiDisconnected(ret, "connect.failed",
|
||||
new ChatComponentText(serverVers < protocolV2 ? "Outdated Server" : "Outdated Client")));
|
||||
new TextComponentString(serverVers < protocolV2 ? "Outdated Server" : "Outdated Client")));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ public class ConnectionHandshake {
|
|||
if (gameVers != 47) {
|
||||
logger.info("Incompatible minecraft protocol version: {}", gameVers);
|
||||
mc.displayGuiScreen(new GuiDisconnected(ret, "connect.failed",
|
||||
new ChatComponentText("This server does not support 1.8!")));
|
||||
new TextComponentString("This server does not support 1.8!")));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ public class ConnectionHandshake {
|
|||
logger.error(
|
||||
"Plaintext authentication was attempted but no user confirmation has been given to proceed");
|
||||
mc.displayGuiScreen(new GuiDisconnected(ret, "connect.failed",
|
||||
new ChatComponentText(EnumChatFormatting.RED
|
||||
new TextComponentString(EnumChatFormatting.RED
|
||||
+ "Plaintext authentication was attempted but no user confirmation has been given to proceed")));
|
||||
return false;
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ public class ConnectionHandshake {
|
|||
} else {
|
||||
logger.error("Unsupported authentication type: {}", authType);
|
||||
mc.displayGuiScreen(new GuiDisconnected(ret, "connect.failed",
|
||||
new ChatComponentText(
|
||||
new TextComponentString(
|
||||
EnumChatFormatting.RED + "Unsupported authentication type: " + authType + "\n\n"
|
||||
+ EnumChatFormatting.GRAY + "(Use a newer version of the client)")));
|
||||
return false;
|
||||
|
@ -370,7 +370,7 @@ public class ConnectionHandshake {
|
|||
di.read(dat);
|
||||
String errStr = new String(dat, StandardCharsets.UTF_8);
|
||||
mc.displayGuiScreen(new GuiDisconnected(ret, "connect.failed",
|
||||
IChatComponent.Serializer.jsonToComponent(errStr)));
|
||||
ITextComponent.Serializer.jsonToComponent(errStr)));
|
||||
return false;
|
||||
} else if (type == HandshakePacketTypes.PROTOCOL_SERVER_ERROR) {
|
||||
showError(mc, connecting, ret, di, serverVers == protocolV2);
|
||||
|
@ -429,18 +429,18 @@ public class ConnectionHandshake {
|
|||
RateLimitTracker.registerLockOut(PlatformNetworking.getCurrentURI());
|
||||
mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(scr));
|
||||
} else if (errorCode == HandshakePacketTypes.SERVER_ERROR_CUSTOM_MESSAGE) {
|
||||
if (IChatComponent.Serializer.jsonToComponent(errStr).getUnformattedText().toLowerCase()
|
||||
if (ITextComponent.Serializer.jsonToComponent(errStr).getUnformattedText().toLowerCase()
|
||||
.contains("reload page")) {
|
||||
EaglerProfile.updateUsernameCookieFromLocalStorage();
|
||||
reloadPage();
|
||||
}
|
||||
mc.displayGuiScreen(
|
||||
new GuiDisconnected(scr, "connect.failed", IChatComponent.Serializer.jsonToComponent(errStr)));
|
||||
new GuiDisconnected(scr, "connect.failed", ITextComponent.Serializer.jsonToComponent(errStr)));
|
||||
} else if (connecting != null && errorCode == HandshakePacketTypes.SERVER_ERROR_AUTHENTICATION_REQUIRED) {
|
||||
mc.displayGuiScreen(new GuiAuthenticationScreen(connecting, scr, errStr));
|
||||
} else {
|
||||
mc.displayGuiScreen(new GuiDisconnected(scr, "connect.failed",
|
||||
new ChatComponentText("Server Error Code " + errorCode + "\n" + errStr)));
|
||||
new TextComponentString("Server Error Code " + errorCode + "\n" + errStr)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ import net.minecraft.network.EnumPacketDirection;
|
|||
import net.minecraft.network.INetHandler;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2022-2024 lax1dude, hoosiertransfer, ayunami2000. All Rights
|
||||
|
@ -85,7 +85,7 @@ public class EaglercraftNetworkManager {
|
|||
@JSBody(params = {}, script = "window.onbeforeunload = null; location.reload();")
|
||||
public static native void reloadPage();
|
||||
|
||||
public void closeChannel(IChatComponent reason) {
|
||||
public void closeChannel(ITextComponent reason) {
|
||||
PlatformNetworking.playDisconnect();
|
||||
if (nethandler != null) {
|
||||
nethandler.onDisconnect(reason);
|
||||
|
@ -210,7 +210,7 @@ public class EaglercraftNetworkManager {
|
|||
processReceivedPackets(); // catch kick message
|
||||
} catch (IOException e) {
|
||||
}
|
||||
doClientDisconnect(new ChatComponentTranslation("disconnect.endOfStream"));
|
||||
doClientDisconnect(new TextComponentTranslation("disconnect.endOfStream"));
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -219,7 +219,7 @@ public class EaglercraftNetworkManager {
|
|||
|
||||
protected boolean clientDisconnected = false;
|
||||
|
||||
protected void doClientDisconnect(IChatComponent msg) {
|
||||
protected void doClientDisconnect(ITextComponent msg) {
|
||||
if (!clientDisconnected) {
|
||||
clientDisconnected = true;
|
||||
if (nethandler != null) {
|
||||
|
|
|
@ -6,19 +6,26 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ImageData;
|
|||
import net.lax1dude.eaglercraft.v1_8.profile.SkinPackets;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.network.play.client.C17PacketCustomPayload;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2024 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
@ -46,11 +53,13 @@ public class SkullCommand {
|
|||
}
|
||||
ImageData loaded = ImageData.loadImageFile(fr.fileData);
|
||||
if (loaded == null) {
|
||||
mc.ingameGUI.getChatGUI().printChatMessage(new ChatComponentTranslation("command.skull.error.invalid.png"));
|
||||
mc.ingameGUI.getChatGUI()
|
||||
.printChatMessage(new TextComponentTranslation("command.skull.error.invalid.png"));
|
||||
return;
|
||||
}
|
||||
if (loaded.width != 64 || loaded.height > 64) {
|
||||
mc.ingameGUI.getChatGUI().printChatMessage(new ChatComponentTranslation("command.skull.error.invalid.skin", loaded.width, loaded.height));
|
||||
mc.ingameGUI.getChatGUI().printChatMessage(
|
||||
new TextComponentTranslation("command.skull.error.invalid.skin", loaded.width, loaded.height));
|
||||
return;
|
||||
}
|
||||
byte[] rawSkin = new byte[loaded.pixels.length << 2];
|
||||
|
@ -62,7 +71,8 @@ public class SkullCommand {
|
|||
rawSkin[j + 2] = (byte) (k >> 8);
|
||||
rawSkin[j + 3] = (byte) (k & 0xFF);
|
||||
}
|
||||
mc.thePlayer.sendQueue.addToSendQueue(new C17PacketCustomPayload("EAG|Skins-1.8", SkinPackets.writeCreateCustomSkull(rawSkin)));
|
||||
mc.thePlayer.sendQueue.addToSendQueue(
|
||||
new C17PacketCustomPayload("EAG|Skins-1.8", SkinPackets.writeCreateCustomSkull(rawSkin)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import net.minecraft.client.gui.GuiScreen;
|
|||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.network.EnumConnectionState;
|
||||
import net.minecraft.network.login.client.C00PacketLoginStart;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class GuiScreenLANConnecting extends GuiScreen {
|
|||
if (mc.currentScreen == this) {
|
||||
mc.loadWorld(null);
|
||||
mc.displayGuiScreen(new GuiDisconnected(parent, "connect.failed",
|
||||
new ChatComponentText("LAN Connection Refused")));
|
||||
new TextComponentString("LAN Connection Refused")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ public class GuiScreenLANConnecting extends GuiScreen {
|
|||
networkManager = LANClientNetworkManager.connectToWorld(sock, code, sock.getURI());
|
||||
if (networkManager == null) {
|
||||
this.mc.displayGuiScreen(new GuiDisconnected(parent, "connect.failed",
|
||||
new ChatComponentText(I18n.format("noRelay.worldFail").replace("$code$", code))));
|
||||
new TextComponentString(I18n.format("noRelay.worldFail").replace("$code$", code))));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,19 +13,26 @@ import net.minecraft.client.multiplayer.WorldClient;
|
|||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.network.EnumConnectionState;
|
||||
import net.minecraft.network.login.client.C00PacketLoginStart;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
@ -47,8 +54,10 @@ public class GuiScreenSingleplayerConnecting extends GuiScreen {
|
|||
}
|
||||
|
||||
public void initGui() {
|
||||
if(startStartTime == 0) this.startStartTime = System.currentTimeMillis();
|
||||
this.buttonList.add(killTask = new GuiButton(0, this.width / 2 - 100, this.height / 3 + 50, I18n.format("singleplayer.busy.killTask")));
|
||||
if (startStartTime == 0)
|
||||
this.startStartTime = System.currentTimeMillis();
|
||||
this.buttonList.add(killTask = new GuiButton(0, this.width / 2 - 100, this.height / 3 + 50,
|
||||
I18n.format("singleplayer.busy.killTask")));
|
||||
killTask.enabled = false;
|
||||
}
|
||||
|
||||
|
@ -60,7 +69,9 @@ public class GuiScreenSingleplayerConnecting extends GuiScreen {
|
|||
long millis = System.currentTimeMillis();
|
||||
|
||||
long dots = (millis / 500l) % 4l;
|
||||
this.drawString(fontRendererObj, message + (dots > 0 ? "." : "") + (dots > 1 ? "." : "") + (dots > 2 ? "." : ""), (this.width - this.fontRendererObj.getStringWidth(message)) / 2, top + 10, 0xFFFFFF);
|
||||
this.drawString(fontRendererObj,
|
||||
message + (dots > 0 ? "." : "") + (dots > 1 ? "." : "") + (dots > 2 ? "." : ""),
|
||||
(this.width - this.fontRendererObj.getStringWidth(message)) / 2, top + 10, 0xFFFFFF);
|
||||
|
||||
long elapsed = (millis - startStartTime) / 1000l;
|
||||
if (elapsed > 3) {
|
||||
|
@ -87,8 +98,10 @@ public class GuiScreenSingleplayerConnecting extends GuiScreen {
|
|||
this.mc.getSession().setLAN();
|
||||
this.mc.clearTitles();
|
||||
this.networkManager.setConnectionState(EnumConnectionState.LOGIN);
|
||||
this.networkManager.setNetHandler(new NetHandlerSingleplayerLogin(this.networkManager, this.mc, this.menu));
|
||||
this.networkManager.sendPacket(new C00PacketLoginStart(this.mc.getSession().getProfile(), EaglerProfile.getSkinPacket(), EaglerProfile.getCapePacket()));
|
||||
this.networkManager.setNetHandler(
|
||||
new NetHandlerSingleplayerLogin(this.networkManager, this.mc, this.menu));
|
||||
this.networkManager.sendPacket(new C00PacketLoginStart(this.mc.getSession().getProfile(),
|
||||
EaglerProfile.getSkinPacket(), EaglerProfile.getCapePacket()));
|
||||
}
|
||||
try {
|
||||
this.networkManager.processReceivedPackets();
|
||||
|
@ -99,7 +112,8 @@ public class GuiScreenSingleplayerConnecting extends GuiScreen {
|
|||
this.mc.getSession().reset();
|
||||
if (mc.currentScreen == this) {
|
||||
mc.loadWorld(null);
|
||||
mc.displayGuiScreen(new GuiDisconnected(menu, "connect.failed", new ChatComponentText("Worker Connection Refused")));
|
||||
mc.displayGuiScreen(new GuiDisconnected(menu, "connect.failed",
|
||||
new TextComponentString("Worker Connection Refused")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.client.gui.GuiButton;
|
|||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
|
||||
/**
|
||||
|
@ -162,7 +162,7 @@ public class GuiShareToLan extends GuiScreen {
|
|||
if (code != null) {
|
||||
SingleplayerServerController.configureLAN(WorldSettings.GameType.getByName(this.gameMode),
|
||||
this.allowCommands);
|
||||
this.mc.ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(I18n.format("lanServer.opened")
|
||||
this.mc.ingameGUI.getChatGUI().printChatMessage(new TextComponentString(I18n.format("lanServer.opened")
|
||||
.replace("$relay$", LANServerController.getCurrentURI()).replace("$code$", code)));
|
||||
} else {
|
||||
this.mc.displayGuiScreen(new GuiScreenNoRelays(this, "noRelay.titleFail"));
|
||||
|
|
|
@ -16,8 +16,8 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.*;
|
|||
import net.minecraft.network.EnumPacketDirection;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -372,7 +372,7 @@ public class LANClientNetworkManager extends EaglercraftNetworkManager {
|
|||
if (fullData.length == 31 && fullData[0] == (byte) 0xFF && fullData[1] == (byte) 0x00
|
||||
&& fullData[2] == (byte) 0x0E) {
|
||||
logger.error("Detected a 1.5 LAN server!");
|
||||
this.closeChannel(new ChatComponentTranslation("singleplayer.outdatedLANServerKick"));
|
||||
this.closeChannel(new TextComponentTranslation("singleplayer.outdatedLANServerKick"));
|
||||
firstPacket = false;
|
||||
return;
|
||||
}
|
||||
|
@ -414,7 +414,7 @@ public class LANClientNetworkManager extends EaglercraftNetworkManager {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void closeChannel(IChatComponent reason) {
|
||||
public void closeChannel(ITextComponent reason) {
|
||||
if (!PlatformWebRTC.clientLANClosed()) {
|
||||
PlatformWebRTC.clientLANCloseConnection();
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ public class LANClientNetworkManager extends EaglercraftNetworkManager {
|
|||
processReceivedPackets(); // catch kick message
|
||||
} catch (IOException e) {
|
||||
}
|
||||
doClientDisconnect(new ChatComponentTranslation("disconnect.endOfStream"));
|
||||
doClientDisconnect(new TextComponentTranslation("disconnect.endOfStream"));
|
||||
}
|
||||
return clientDisconnected;
|
||||
}
|
||||
|
|
|
@ -3,19 +3,26 @@ package net.lax1dude.eaglercraft.v1_8.sp.server;
|
|||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2024 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
@ -49,7 +56,7 @@ public class ClientCommandDummy extends CommandBase {
|
|||
|
||||
@Override
|
||||
public void processCommand(ICommandSender var1, String[] var2) throws CommandException {
|
||||
var1.addChatMessage(new ChatComponentTranslation("command.clientStub"));
|
||||
var1.addChatMessage(new TextComponentTranslation("command.clientStub"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,9 +20,9 @@ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
|
|||
import net.lax1dude.eaglercraft.v1_8.sp.ipc.*;
|
||||
import net.minecraft.network.EnumConnectionState;
|
||||
import net.minecraft.server.network.NetHandlerLoginServer;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ReportedException;
|
||||
import net.minecraft.util.StringTranslate;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.world.EnumDifficulty;
|
||||
import net.minecraft.world.WorldSettings;
|
||||
import net.minecraft.world.WorldSettings.GameType;
|
||||
|
@ -114,7 +114,7 @@ public class EaglerIntegratedServerWorker {
|
|||
public static void closeChannel(String channel) {
|
||||
IntegratedServerPlayerNetworkManager netmanager = openChannels.remove(channel);
|
||||
if (netmanager != null) {
|
||||
netmanager.closeChannel(new ChatComponentText("End of stream"));
|
||||
netmanager.closeChannel(new TextComponentString("End of stream"));
|
||||
sendIPCPacket(new IPCPacket0CPlayerChannel(channel, false));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ import net.minecraft.init.Items;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.network.play.server.S3FPacketCustomPayload;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
|
@ -27,14 +27,21 @@ import net.minecraft.nbt.NBTTagString;
|
|||
/**
|
||||
* Copyright (c) 2022-2024 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
@ -96,7 +103,8 @@ public class IntegratedSkinService {
|
|||
if (playerSkin == null) {
|
||||
playerSkin = IntegratedSkinPackets.makePresetResponse(searchUUID);
|
||||
}
|
||||
sender.playerNetServerHandler.sendPacket(new S3FPacketCustomPayload(CHANNEL, new PacketBuffer(Unpooled.buffer(playerSkin, playerSkin.length).writerIndex(playerSkin.length))));
|
||||
sender.playerNetServerHandler.sendPacket(new S3FPacketCustomPayload(CHANNEL,
|
||||
new PacketBuffer(Unpooled.buffer(playerSkin, playerSkin.length).writerIndex(playerSkin.length))));
|
||||
}
|
||||
|
||||
public void processPacketGetOtherSkin(EaglercraftUUID searchUUID, String urlStr, EntityPlayerMP sender) {
|
||||
|
@ -118,7 +126,8 @@ public class IntegratedSkinService {
|
|||
playerSkin = IntegratedSkinPackets.makeCustomResponse(searchUUID, 0, sk.getFullSkin());
|
||||
}
|
||||
}
|
||||
sender.playerNetServerHandler.sendPacket(new S3FPacketCustomPayload(CHANNEL, new PacketBuffer(Unpooled.buffer(playerSkin, playerSkin.length).writerIndex(playerSkin.length))));
|
||||
sender.playerNetServerHandler.sendPacket(new S3FPacketCustomPayload(CHANNEL,
|
||||
new PacketBuffer(Unpooled.buffer(playerSkin, playerSkin.length).writerIndex(playerSkin.length))));
|
||||
}
|
||||
|
||||
public void processPacketPlayerSkin(EaglercraftUUID clientUUID, byte[] generatedPacket, int skinModel) {
|
||||
|
@ -131,7 +140,7 @@ public class IntegratedSkinService {
|
|||
|
||||
public void processPacketInstallNewSkin(byte[] skullData, EntityPlayerMP sender) {
|
||||
if (!sender.canCommandSenderUseCommand(2, "give")) {
|
||||
ChatComponentTranslation cc = new ChatComponentTranslation("command.skull.nopermission");
|
||||
TextComponentTranslation cc = new TextComponentTranslation("command.skull.nopermission");
|
||||
cc.getChatStyle().setColor(EnumChatFormatting.RED);
|
||||
sender.addChatMessage(cc);
|
||||
return;
|
||||
|
@ -140,12 +149,15 @@ public class IntegratedSkinService {
|
|||
NBTTagCompound rootTagCompound = new NBTTagCompound();
|
||||
NBTTagCompound ownerTagCompound = new NBTTagCompound();
|
||||
ownerTagCompound.setString("Name", "Eagler");
|
||||
ownerTagCompound.setString("Id", EaglercraftUUID.nameUUIDFromBytes((("EaglerSkullUUID:" + fileName).getBytes(StandardCharsets.UTF_8))).toString());
|
||||
ownerTagCompound.setString("Id", EaglercraftUUID
|
||||
.nameUUIDFromBytes((("EaglerSkullUUID:" + fileName).getBytes(StandardCharsets.UTF_8))).toString());
|
||||
NBTTagCompound propertiesTagCompound = new NBTTagCompound();
|
||||
NBTTagList texturesTagList = new NBTTagList();
|
||||
NBTTagCompound texturesTagCompound = new NBTTagCompound();
|
||||
String texturesProp = "{\"textures\":{\"SKIN\":{\"url\":\"" + fileName + "\",\"metadata\":{\"model\":\"default\"}}}}";
|
||||
texturesTagCompound.setString("Value", Base64.encodeBase64String(texturesProp.getBytes(StandardCharsets.UTF_8)));
|
||||
String texturesProp = "{\"textures\":{\"SKIN\":{\"url\":\"" + fileName
|
||||
+ "\",\"metadata\":{\"model\":\"default\"}}}}";
|
||||
texturesTagCompound.setString("Value",
|
||||
Base64.encodeBase64String(texturesProp.getBytes(StandardCharsets.UTF_8)));
|
||||
texturesTagList.appendTag(texturesTagCompound);
|
||||
propertiesTagCompound.setTag("textures", texturesTagList);
|
||||
ownerTagCompound.setTag("Properties", propertiesTagCompound);
|
||||
|
@ -153,7 +165,8 @@ public class IntegratedSkinService {
|
|||
NBTTagCompound displayTagCompound = new NBTTagCompound();
|
||||
displayTagCompound.setString("Name", EnumChatFormatting.RESET + "Custom Eaglercraft Skull");
|
||||
NBTTagList loreList = new NBTTagList();
|
||||
loreList.appendTag(new NBTTagString(EnumChatFormatting.GRAY + (fileName.length() > 24 ? (fileName.substring(0, 22) + "...") : fileName)));
|
||||
loreList.appendTag(new NBTTagString(
|
||||
EnumChatFormatting.GRAY + (fileName.length() > 24 ? (fileName.substring(0, 22) + "...") : fileName)));
|
||||
displayTagCompound.setTag("Lore", loreList);
|
||||
rootTagCompound.setTag("display", displayTagCompound);
|
||||
ItemStack stack = new ItemStack(Items.skull, 1, 3);
|
||||
|
@ -165,7 +178,7 @@ public class IntegratedSkinService {
|
|||
* 2.0F);
|
||||
sender.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
sender.addChatMessage(new ChatComponentTranslation("command.skull.feedback", fileName));
|
||||
sender.addChatMessage(new TextComponentTranslation("command.skull.feedback", fileName));
|
||||
}
|
||||
|
||||
private static final String hex = "0123456789abcdef";
|
||||
|
|
|
@ -22,9 +22,9 @@ import net.minecraft.network.EnumPacketDirection;
|
|||
import net.minecraft.network.INetHandler;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer;
|
||||
|
||||
/**
|
||||
|
@ -94,7 +94,7 @@ public class IntegratedServerPlayerNetworkManager {
|
|||
: EnumEaglerConnectionState.CLOSED;
|
||||
}
|
||||
|
||||
public void closeChannel(IChatComponent reason) {
|
||||
public void closeChannel(ITextComponent reason) {
|
||||
EaglerIntegratedServerWorker.closeChannel(playerChannel);
|
||||
if (nethandler != null) {
|
||||
nethandler.onDisconnect(reason);
|
||||
|
@ -141,7 +141,7 @@ public class IntegratedServerPlayerNetworkManager {
|
|||
}
|
||||
ServerPlatformSingleplayer
|
||||
.sendPacket(new IPCPacketData(playerChannel, kickPacketBAO.toByteArray()));
|
||||
closeChannel(new ChatComponentText(
|
||||
closeChannel(new TextComponentString(
|
||||
"Recieved unsuppoorted connection from an Eaglercraft 1.5.2 client!"));
|
||||
firstPacket = false;
|
||||
recievedPacketBufferCounter = 0;
|
||||
|
|
|
@ -4,19 +4,26 @@ import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer;
|
|||
import net.minecraft.network.handshake.INetHandlerHandshakeServer;
|
||||
import net.minecraft.network.handshake.client.C00Handshake;
|
||||
import net.minecraft.server.network.NetHandlerLoginServer;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2023-2024 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
@ -26,13 +33,14 @@ public class NetHandlerHandshakeEagler implements INetHandlerHandshakeServer {
|
|||
private final EaglerMinecraftServer mcServer;
|
||||
private final IntegratedServerPlayerNetworkManager networkManager;
|
||||
|
||||
public NetHandlerHandshakeEagler(EaglerMinecraftServer parMinecraftServer, IntegratedServerPlayerNetworkManager parNetworkManager) {
|
||||
public NetHandlerHandshakeEagler(EaglerMinecraftServer parMinecraftServer,
|
||||
IntegratedServerPlayerNetworkManager parNetworkManager) {
|
||||
this.mcServer = parMinecraftServer;
|
||||
this.networkManager = parNetworkManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisconnect(IChatComponent var1) {
|
||||
public void onDisconnect(ITextComponent var1) {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController;
|
|||
import net.minecraft.network.EnumPacketDirection;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2023-2024 lax1dude, hoosiertransfer, ayunami2000. All Rights
|
||||
|
@ -62,7 +62,7 @@ public class ClientIntegratedServerNetworkManager extends EaglercraftNetworkMana
|
|||
}
|
||||
|
||||
@Override
|
||||
public void closeChannel(IChatComponent reason) {
|
||||
public void closeChannel(ITextComponent reason) {
|
||||
LANServerController.closeLAN();
|
||||
SingleplayerServerController.closeLocalPlayerChannel();
|
||||
if (nethandler != null) {
|
||||
|
@ -169,7 +169,7 @@ public class ClientIntegratedServerNetworkManager extends EaglercraftNetworkMana
|
|||
} catch (IOException e) {
|
||||
}
|
||||
clearRecieveQueue();
|
||||
doClientDisconnect(new ChatComponentTranslation("disconnect.endOfStream"));
|
||||
doClientDisconnect(new TextComponentTranslation("disconnect.endOfStream"));
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
@ -15,19 +15,26 @@ import net.minecraft.network.login.server.S01PacketEncryptionRequest;
|
|||
import net.minecraft.network.login.server.S02PacketLoginSuccess;
|
||||
import net.minecraft.network.login.server.S03PacketEnableCompression;
|
||||
import net.minecraft.network.play.client.C17PacketCustomPayload;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2023-2024 lax1dude. All Rights Reserved.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
|
@ -38,14 +45,15 @@ public class NetHandlerSingleplayerLogin implements INetHandlerLoginClient {
|
|||
private final GuiScreen previousGuiScreen;
|
||||
private final EaglercraftNetworkManager networkManager;
|
||||
|
||||
public NetHandlerSingleplayerLogin(EaglercraftNetworkManager parNetworkManager, Minecraft mcIn, GuiScreen parGuiScreen) {
|
||||
public NetHandlerSingleplayerLogin(EaglercraftNetworkManager parNetworkManager, Minecraft mcIn,
|
||||
GuiScreen parGuiScreen) {
|
||||
this.networkManager = parNetworkManager;
|
||||
this.mc = mcIn;
|
||||
this.previousGuiScreen = parGuiScreen;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisconnect(IChatComponent var1) {
|
||||
public void onDisconnect(ITextComponent var1) {
|
||||
this.mc.displayGuiScreen(new GuiDisconnected(this.previousGuiScreen, "connect.failed", var1));
|
||||
}
|
||||
|
||||
|
@ -57,10 +65,12 @@ public class NetHandlerSingleplayerLogin implements INetHandlerLoginClient {
|
|||
@Override
|
||||
public void handleLoginSuccess(S02PacketLoginSuccess var1) {
|
||||
this.networkManager.setConnectionState(EnumConnectionState.PLAY);
|
||||
this.networkManager.setNetHandler(new NetHandlerPlayClient(this.mc, this.previousGuiScreen, this.networkManager, var1.getProfile()));
|
||||
this.networkManager.setNetHandler(
|
||||
new NetHandlerPlayClient(this.mc, this.previousGuiScreen, this.networkManager, var1.getProfile()));
|
||||
byte[] b = UpdateService.getClientSignatureData();
|
||||
if (b != null) {
|
||||
this.networkManager.sendPacket(new C17PacketCustomPayload("EAG|MyUpdCert-1.8", new PacketBuffer(Unpooled.buffer(b, b.length).writerIndex(b.length))));
|
||||
this.networkManager.sendPacket(new C17PacketCustomPayload("EAG|MyUpdCert-1.8",
|
||||
new PacketBuffer(Unpooled.buffer(b, b.length).writerIndex(b.length))));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ import net.minecraft.client.gui.GuiButton;
|
|||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* Copyright (c) 2022-2024 lax1dude, hoosiertransfer, ayunami2000. All Rights
|
||||
|
|
|
@ -29,16 +29,16 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ObjectIntIdentityMap;
|
||||
import net.minecraft.util.RegistryNamespacedDefaultedByKey;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.registry.RegistryNamespacedDefaultedByKey;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -693,16 +693,16 @@ public class Block implements ILitBlock {
|
|||
* Ray traces through the blocks collision from start vector to
|
||||
* end vector returning a ray trace hit.
|
||||
*/
|
||||
public MovingObjectPosition collisionRayTrace(World world, BlockPos blockpos, Vec3 vec3, Vec3 vec31) {
|
||||
public RayTraceResult collisionRayTrace(World world, BlockPos blockpos, Vec3d vec3, Vec3d vec31) {
|
||||
this.setBlockBoundsBasedOnState(world, blockpos);
|
||||
vec3 = vec3.addVector((double) (-blockpos.getX()), (double) (-blockpos.getY()), (double) (-blockpos.getZ()));
|
||||
vec31 = vec31.addVector((double) (-blockpos.getX()), (double) (-blockpos.getY()), (double) (-blockpos.getZ()));
|
||||
Vec3 vec32 = vec3.getIntermediateWithXValue(vec31, this.minX);
|
||||
Vec3 vec33 = vec3.getIntermediateWithXValue(vec31, this.maxX);
|
||||
Vec3 vec34 = vec3.getIntermediateWithYValue(vec31, this.minY);
|
||||
Vec3 vec35 = vec3.getIntermediateWithYValue(vec31, this.maxY);
|
||||
Vec3 vec36 = vec3.getIntermediateWithZValue(vec31, this.minZ);
|
||||
Vec3 vec37 = vec3.getIntermediateWithZValue(vec31, this.maxZ);
|
||||
Vec3d vec32 = vec3.getIntermediateWithXValue(vec31, this.minX);
|
||||
Vec3d vec33 = vec3.getIntermediateWithXValue(vec31, this.maxX);
|
||||
Vec3d vec34 = vec3.getIntermediateWithYValue(vec31, this.minY);
|
||||
Vec3d vec35 = vec3.getIntermediateWithYValue(vec31, this.maxY);
|
||||
Vec3d vec36 = vec3.getIntermediateWithZValue(vec31, this.minZ);
|
||||
Vec3d vec37 = vec3.getIntermediateWithZValue(vec31, this.maxZ);
|
||||
if (!this.isVecInsideYZBounds(vec32)) {
|
||||
vec32 = null;
|
||||
}
|
||||
|
@ -727,7 +727,7 @@ public class Block implements ILitBlock {
|
|||
vec37 = null;
|
||||
}
|
||||
|
||||
Vec3 vec38 = null;
|
||||
Vec3d vec38 = null;
|
||||
if (vec32 != null && (vec38 == null || vec3.squareDistanceTo(vec32) < vec3.squareDistanceTo(vec38))) {
|
||||
vec38 = vec32;
|
||||
}
|
||||
|
@ -780,7 +780,7 @@ public class Block implements ILitBlock {
|
|||
enumfacing = EnumFacing.SOUTH;
|
||||
}
|
||||
|
||||
return new MovingObjectPosition(
|
||||
return new RayTraceResult(
|
||||
vec38.addVector((double) blockpos.getX(), (double) blockpos.getY(), (double) blockpos.getZ()),
|
||||
enumfacing, blockpos);
|
||||
}
|
||||
|
@ -790,7 +790,7 @@ public class Block implements ILitBlock {
|
|||
* +
|
||||
* Checks if a vector is within the Y and Z bounds of the block.
|
||||
*/
|
||||
private boolean isVecInsideYZBounds(Vec3 point) {
|
||||
private boolean isVecInsideYZBounds(Vec3d point) {
|
||||
return point == null ? false
|
||||
: point.yCoord >= this.minY && point.yCoord <= this.maxY && point.zCoord >= this.minZ
|
||||
&& point.zCoord <= this.maxZ;
|
||||
|
@ -800,7 +800,7 @@ public class Block implements ILitBlock {
|
|||
* +
|
||||
* Checks if a vector is within the X and Z bounds of the block.
|
||||
*/
|
||||
private boolean isVecInsideXZBounds(Vec3 point) {
|
||||
private boolean isVecInsideXZBounds(Vec3d point) {
|
||||
return point == null ? false
|
||||
: point.xCoord >= this.minX && point.xCoord <= this.maxX && point.zCoord >= this.minZ
|
||||
&& point.zCoord <= this.maxZ;
|
||||
|
@ -810,7 +810,7 @@ public class Block implements ILitBlock {
|
|||
* +
|
||||
* Checks if a vector is within the X and Y bounds of the block.
|
||||
*/
|
||||
private boolean isVecInsideXYBounds(Vec3 point) {
|
||||
private boolean isVecInsideXYBounds(Vec3d point) {
|
||||
return point == null ? false
|
||||
: point.xCoord >= this.minX && point.xCoord <= this.maxX && point.yCoord >= this.minY
|
||||
&& point.yCoord <= this.maxY;
|
||||
|
@ -868,7 +868,7 @@ public class Block implements ILitBlock {
|
|||
public void onBlockClicked(World worldIn, BlockPos pos, EntityPlayer playerIn) {
|
||||
}
|
||||
|
||||
public Vec3 modifyAcceleration(World worldIn, BlockPos pos, Entity entityIn, Vec3 motion) {
|
||||
public Vec3d modifyAcceleration(World worldIn, BlockPos pos, Entity entityIn, Vec3d motion) {
|
||||
return motion;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ package net.minecraft.block;
|
|||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,10 +18,10 @@ import net.minecraft.inventory.Container;
|
|||
import net.minecraft.inventory.ContainerRepair;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.IInteractionObject;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -194,8 +194,8 @@ public class BlockAnvil extends BlockFalling {
|
|||
return false;
|
||||
}
|
||||
|
||||
public IChatComponent getDisplayName() {
|
||||
return new ChatComponentTranslation(Blocks.anvil.getUnlocalizedName() + ".name", new Object[0]);
|
||||
public ITextComponent getDisplayName() {
|
||||
return new TextComponentTranslation(Blocks.anvil.getUnlocalizedName() + ".name", new Object[0]);
|
||||
}
|
||||
|
||||
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) {
|
||||
|
|
|
@ -15,10 +15,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityBanner;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package net.minecraft.block;
|
|||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,9 +7,9 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityBeacon;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
|
|
@ -15,11 +15,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
@ -92,7 +92,7 @@ public class BlockBed extends BlockDirectional {
|
|||
blockpos1 = blockpos.up();
|
||||
}
|
||||
entityplayer.setSpawnPoint(blockpos1.add(0.5F, 0.1F, 0.5F), false);
|
||||
entityplayer.addChatComponentMessage(new ChatComponentTranslation("tile.bed.setspawn"));
|
||||
entityplayer.addChatComponentMessage(new TextComponentTranslation("tile.bed.setspawn"));
|
||||
if (entityplayer.isSneaking()) {
|
||||
return true;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ public class BlockBed extends BlockDirectional {
|
|||
EntityPlayer entityplayer1 = this.getPlayerInBed(world, blockpos);
|
||||
if (entityplayer1 != null) {
|
||||
entityplayer
|
||||
.addChatComponentMessage(new ChatComponentTranslation("tile.bed.occupied", new Object[0]));
|
||||
.addChatComponentMessage(new TextComponentTranslation("tile.bed.occupied", new Object[0]));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -118,10 +118,10 @@ public class BlockBed extends BlockDirectional {
|
|||
} else {
|
||||
if (entityplayer$enumstatus == EntityPlayer.EnumStatus.NOT_POSSIBLE_NOW) {
|
||||
entityplayer
|
||||
.addChatComponentMessage(new ChatComponentTranslation("tile.bed.noSleep", new Object[0]));
|
||||
.addChatComponentMessage(new TextComponentTranslation("tile.bed.noSleep", new Object[0]));
|
||||
} else if (entityplayer$enumstatus == EntityPlayer.EnumStatus.NOT_SAFE) {
|
||||
entityplayer
|
||||
.addChatComponentMessage(new ChatComponentTranslation("tile.bed.notSafe", new Object[0]));
|
||||
.addChatComponentMessage(new TextComponentTranslation("tile.bed.notSafe", new Object[0]));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.hoosiertransfer.EaglerItems;
|
|||
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockBeetroot extends BlockCrops {
|
||||
|
@ -14,20 +14,15 @@ public class BlockBeetroot extends BlockCrops {
|
|||
return 3;
|
||||
}
|
||||
|
||||
public void updateTick(World worldIn, BlockPos pos, IBlockState state, EaglercraftRandom rand)
|
||||
{
|
||||
if (rand.nextInt(3) == 0)
|
||||
{
|
||||
public void updateTick(World worldIn, BlockPos pos, IBlockState state, EaglercraftRandom rand) {
|
||||
if (rand.nextInt(3) == 0) {
|
||||
this.checkAndDropBlock(worldIn, pos, state);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
super.updateTick(worldIn, pos, state, rand);
|
||||
}
|
||||
}
|
||||
|
||||
protected int getBonemealAgeIncrease(World worldIn)
|
||||
{
|
||||
protected int getBonemealAgeIncrease(World worldIn) {
|
||||
return super.getBonemealAgeIncrease(worldIn) / 3;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import net.minecraft.block.material.MapColor;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,12 +21,12 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityBrewingStand;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,9 +7,9 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,9 +13,9 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
@ -122,18 +122,17 @@ public class BlockCactus extends Block {
|
|||
}
|
||||
|
||||
public boolean canBlockStay(World worldIn, BlockPos pos) {
|
||||
for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL)
|
||||
{
|
||||
for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL) {
|
||||
Material material = worldIn.getBlockState(pos.offset(enumfacing)).getBlock().getMaterial();
|
||||
|
||||
if (material.isSolid() || material == Material.lava)
|
||||
{
|
||||
if (material.isSolid() || material == Material.lava) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Block block = worldIn.getBlockState(pos.down()).getBlock();
|
||||
return block == Blocks.cactus || block == Blocks.sand && !worldIn.getBlockState(pos.up()).getBlock().getMaterial().isLiquid();
|
||||
return block == Blocks.cactus
|
||||
|| block == Blocks.sand && !worldIn.getBlockState(pos.up()).getBlock().getMaterial().isLiquid();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,10 +11,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ import net.minecraft.item.EnumDyeColor;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ import net.minecraft.item.ItemBanner;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntityBanner;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
@ -141,20 +141,16 @@ public class BlockCauldron extends Block {
|
|||
|
||||
return true;
|
||||
} else if (item == Items.bucket) {
|
||||
if (i == 3 && !world.isRemote)
|
||||
{
|
||||
if (!entityplayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (i == 3 && !world.isRemote) {
|
||||
if (!entityplayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem = entityplayer.inventory.getCurrentItem();
|
||||
--heldItem.stackSize;
|
||||
|
||||
if (heldItem.stackSize == 0)
|
||||
{
|
||||
if (heldItem.stackSize == 0) {
|
||||
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem,
|
||||
new ItemStack(Items.water_bucket));
|
||||
}
|
||||
else if (!entityplayer.inventory.addItemStackToInventory(new ItemStack(Items.water_bucket)))
|
||||
{
|
||||
} else if (!entityplayer.inventory
|
||||
.addItemStackToInventory(new ItemStack(Items.water_bucket))) {
|
||||
entityplayer.dropPlayerItemWithRandomChoice(new ItemStack(Items.water_bucket), false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,10 +20,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.ILockableContainer;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -17,9 +17,9 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockChorusFlower extends Block {
|
||||
|
|
|
@ -15,10 +15,10 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -13,10 +13,10 @@ import net.minecraft.init.Items;
|
|||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityCommandBlock;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.StringUtils;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,8 +3,8 @@ package net.minecraft.block;
|
|||
import net.minecraft.block.material.MapColor;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,8 +4,8 @@ import net.minecraft.block.material.MapColor;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,8 +11,8 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
@ -80,23 +80,19 @@ public class BlockCrops extends BlockBush implements IGrowable {
|
|||
|
||||
}
|
||||
|
||||
public IBlockState withAge(int age)
|
||||
{
|
||||
public IBlockState withAge(int age) {
|
||||
return this.getDefaultState().withProperty(AGE, Integer.valueOf(age));
|
||||
}
|
||||
|
||||
protected int getAge(IBlockState state)
|
||||
{
|
||||
protected int getAge(IBlockState state) {
|
||||
return ((Integer) state.getValue(AGE)).intValue();
|
||||
}
|
||||
|
||||
public void grow(World worldIn, BlockPos pos, IBlockState state)
|
||||
{
|
||||
public void grow(World worldIn, BlockPos pos, IBlockState state) {
|
||||
int i = this.getAge(state) + this.getBonemealAgeIncrease(worldIn);
|
||||
int j = this.getMaxAge();
|
||||
|
||||
if (i > j)
|
||||
{
|
||||
if (i > j) {
|
||||
i = j;
|
||||
}
|
||||
|
||||
|
@ -162,8 +158,7 @@ public class BlockCrops extends BlockBush implements IGrowable {
|
|||
return Items.wheat;
|
||||
}
|
||||
|
||||
public int getMaxAge()
|
||||
{
|
||||
public int getMaxAge() {
|
||||
return 7;
|
||||
}
|
||||
|
||||
|
@ -211,8 +206,7 @@ public class BlockCrops extends BlockBush implements IGrowable {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected int getBonemealAgeIncrease(World worldIn)
|
||||
{
|
||||
protected int getBonemealAgeIncrease(World worldIn) {
|
||||
return MathHelper.getRandomIntegerInRange(worldIn.rand, 2, 5);
|
||||
}
|
||||
|
||||
|
@ -220,8 +214,7 @@ public class BlockCrops extends BlockBush implements IGrowable {
|
|||
this.grow(world, blockpos, iblockstate);
|
||||
}
|
||||
|
||||
public boolean isMaxAge(IBlockState state)
|
||||
{
|
||||
public boolean isMaxAge(IBlockState state) {
|
||||
return ((Integer) state.getValue(AGE)).intValue() >= this.getMaxAge();
|
||||
}
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityDaylightDetector;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -74,21 +74,17 @@ public class BlockDaylightDetector extends BlockContainer {
|
|||
return ((Integer) iblockstate.getValue(POWER)).intValue();
|
||||
}
|
||||
|
||||
public void updatePower(World worldIn, BlockPos pos)
|
||||
{
|
||||
if (!worldIn.provider.getHasNoSky())
|
||||
{
|
||||
public void updatePower(World worldIn, BlockPos pos) {
|
||||
if (!worldIn.provider.getHasNoSky()) {
|
||||
IBlockState iblockstate = worldIn.getBlockState(pos);
|
||||
int i = worldIn.getLightFor(EnumSkyBlock.SKY, pos) - worldIn.getSkylightSubtracted();
|
||||
float f = worldIn.getCelestialAngleRadians(1.0F);
|
||||
|
||||
if (this.inverted)
|
||||
{
|
||||
if (this.inverted) {
|
||||
i = 15 - i;
|
||||
}
|
||||
|
||||
if (i > 0 && !this.inverted)
|
||||
{
|
||||
if (i > 0 && !this.inverted) {
|
||||
float f1 = f < (float) Math.PI ? 0.0F : ((float) Math.PI * 2F);
|
||||
f = f + (f1 - f) * 0.2F;
|
||||
i = Math.round((float) i * MathHelper.cos(f));
|
||||
|
@ -96,8 +92,7 @@ public class BlockDaylightDetector extends BlockContainer {
|
|||
|
||||
i = MathHelper.clamp_int(i, 0, 15);
|
||||
|
||||
if (((Integer)iblockstate.getValue(POWER)).intValue() != i)
|
||||
{
|
||||
if (((Integer) iblockstate.getValue(POWER)).intValue() != i) {
|
||||
worldIn.setBlockState(pos, iblockstate.withProperty(POWER, Integer.valueOf(i)), 3);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
@ -88,8 +88,7 @@ public class BlockDeadBush extends BlockBush {
|
|||
/**
|
||||
* Returns the quantity of items to drop on block destruction.
|
||||
*/
|
||||
public int quantityDropped(EaglercraftRandom random)
|
||||
{
|
||||
public int quantityDropped(EaglercraftRandom random) {
|
||||
return random.nextInt(3);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@ import net.minecraft.stats.StatList;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityDispenser;
|
||||
import net.minecraft.tileentity.TileEntityDropper;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.RegistryDefaulted;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.registry.RegistryDefaulted;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,14 +13,14 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -254,7 +254,7 @@ public class BlockDoor extends Block {
|
|||
* Ray traces through the blocks collision from start vector to
|
||||
* end vector returning a ray trace hit.
|
||||
*/
|
||||
public MovingObjectPosition collisionRayTrace(World world, BlockPos blockpos, Vec3 vec3, Vec3 vec31) {
|
||||
public RayTraceResult collisionRayTrace(World world, BlockPos blockpos, Vec3d vec3, Vec3d vec31) {
|
||||
this.setBlockBoundsBasedOnState(world, blockpos);
|
||||
return super.collisionRayTrace(world, blockpos, vec3, vec31);
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeColorHelper;
|
||||
|
|
|
@ -8,9 +8,9 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.entity.item.EntityFallingBlock;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.tileentity.TileEntityDispenser;
|
||||
import net.minecraft.tileentity.TileEntityDropper;
|
||||
import net.minecraft.tileentity.TileEntityHopper;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,8 +7,8 @@ import java.util.Set;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,9 +12,9 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityEnchantmentTable;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,10 +10,10 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityEndPortal;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,11 +9,11 @@ import net.minecraft.block.state.BlockState;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -96,10 +96,8 @@ public class BlockEndRod extends Block {
|
|||
double d3 = (double) (0.4F - (rand.nextFloat() + rand.nextFloat()) * 0.4F);
|
||||
|
||||
if (rand.nextInt(5) == 0) {
|
||||
worldIn.spawnParticle(EnumParticleTypes.END_ROD, d0 + (double)
|
||||
enumfacing.getFrontOffsetX() * d3,
|
||||
d1 + (double) enumfacing.getFrontOffsetY() * d3, d2 + (double)
|
||||
enumfacing.getFrontOffsetZ() * d3,
|
||||
worldIn.spawnParticle(EnumParticleTypes.END_ROD, d0 + (double) enumfacing.getFrontOffsetX() * d3,
|
||||
d1 + (double) enumfacing.getFrontOffsetY() * d3, d2 + (double) enumfacing.getFrontOffsetZ() * d3,
|
||||
rand.nextGaussian() * 0.005D, rand.nextGaussian() * 0.005D,
|
||||
rand.nextGaussian() * 0.005D,
|
||||
new int[0]);
|
||||
|
|
|
@ -17,9 +17,9 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityEnderChest;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package net.minecraft.block;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
/**
|
||||
* +
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.item.EntityFallingBlock;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,9 +13,9 @@ import net.minecraft.entity.EntityLivingBase;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -94,10 +94,10 @@ public class BlockFarmland extends Block {
|
|||
/**
|
||||
* Block's chance to react to a living entity falling on it.
|
||||
*/
|
||||
public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance)
|
||||
{
|
||||
if (!worldIn.isRemote && worldIn.rand.nextFloat() < fallDistance - 0.5F && entityIn instanceof EntityLivingBase && (entityIn instanceof EntityPlayer || worldIn.getGameRules().getBoolean("mobGriefing")) && entityIn.width * entityIn.width * entityIn.height > 0.512F)
|
||||
{
|
||||
public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance) {
|
||||
if (!worldIn.isRemote && worldIn.rand.nextFloat() < fallDistance - 0.5F && entityIn instanceof EntityLivingBase
|
||||
&& (entityIn instanceof EntityPlayer || worldIn.getGameRules().getBoolean("mobGriefing"))
|
||||
&& entityIn.width * entityIn.width * entityIn.height > 0.512F) {
|
||||
worldIn.setBlockState(pos, Blocks.dirt.getDefaultState());
|
||||
}
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemLead;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -13,11 +13,11 @@ import net.minecraft.block.properties.PropertyInteger;
|
|||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldProviderEnd;
|
||||
|
|
|
@ -17,11 +17,11 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityFlowerPot;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ import net.minecraft.block.state.BlockState;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockFrostedIce extends BlockIce {
|
||||
|
|
|
@ -17,9 +17,9 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
/**
|
||||
* +
|
||||
|
|
|
@ -10,8 +10,8 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ColorizerGrass;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -9,9 +9,9 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
@ -105,8 +105,7 @@ public class BlockHay extends BlockRotatedPillar {
|
|||
/**
|
||||
* Block's chance to react to a living entity falling on it.
|
||||
*/
|
||||
public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance)
|
||||
{
|
||||
public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance) {
|
||||
entityIn.fall(fallDistance, 0.2F);
|
||||
}
|
||||
}
|
|
@ -21,10 +21,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityHopper;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ import net.minecraft.block.state.BlockState;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,8 +11,8 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,10 +7,10 @@ import net.minecraft.block.state.BlockState;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ColorizerFoliage;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package net.minecraft.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
/**
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue