Skip to content

Commit

Permalink
deobfParams
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyfts authored and Dream-Master committed May 16, 2024
1 parent a5bec6c commit c5d7770
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 47 deletions.
17 changes: 8 additions & 9 deletions src/main/java/tconstruct/blocks/BlockFalling.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,19 @@ public BlockFalling(Material p_i45405_1_) {
}

@Override
public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) {
p_149726_1_.scheduleBlockUpdate(p_149726_2_, p_149726_3_, p_149726_4_, this, this.tickRate(p_149726_1_));
public void onBlockAdded(World worldIn, int x, int y, int z) {
worldIn.scheduleBlockUpdate(x, y, z, this, this.tickRate(worldIn));
}

@Override
public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_,
Block p_149695_5_) {
p_149695_1_.scheduleBlockUpdate(p_149695_2_, p_149695_3_, p_149695_4_, this, this.tickRate(p_149695_1_));
public void onNeighborBlockChange(World worldIn, int x, int y, int z, Block neighbor) {
worldIn.scheduleBlockUpdate(x, y, z, this, this.tickRate(worldIn));
}

@Override
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) {
if (!p_149674_1_.isRemote) {
this.func_149830_m(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_);
public void updateTick(World worldIn, int x, int y, int z, Random random) {
if (!worldIn.isRemote) {
this.func_149830_m(worldIn, x, y, z);
}
}

Expand Down Expand Up @@ -79,7 +78,7 @@ private void func_149830_m(World p_149830_1_, int p_149830_2_, int p_149830_3_,
protected void func_149829_a(EntityFallingBlock p_149829_1_) {}

@Override
public int tickRate(World p_149738_1_) {
public int tickRate(World worldIn) {
return 2;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/slime/SlimeGrass.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public Block blockDropped(int metadata, Random random, int fortune) {
}

@Override
public Item getItemDropped(int metadata, Random random, int p_149650_3_) {
if (metadata == 1) return Blocks.dirt.getItemDropped(metadata, random, p_149650_3_);
public Item getItemDropped(int metadata, Random random, int fortune) {
if (metadata == 1) return Blocks.dirt.getItemDropped(metadata, random, fortune);
else return ItemSaddle.getItemFromBlock(TinkerTools.craftedSoil);
}
}
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/slime/SlimeLeaves.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void getSubBlocks(Item id, CreativeTabs tab, List<ItemStack> list) {
* Returns the ID of the items to drop on destruction.
*/
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
public Item getItemDropped(int meta, Random random, int fortune) {
return Item.getItemFromBlock(TinkerWorld.slimeSapling);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public boolean dealDamage(float damage, ToolCore ammo, NBTTagCompound tags, Enti
}

@Override
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_) {
public void setVelocity(double x, double y, double z) {
// don't do anything, we set it ourselves at spawn
// Mojangs code has a hard cap of 3.9 speed, but our projectiles can go faster, which desyncs client and server
// speeds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public ItemStack dispenseStack(IBlockSource blockSource, ItemStack stack) {
/**
* Play the dispense sound from the specified block.
*/
protected void playDispenseSound(IBlockSource p_82485_1_) {
p_82485_1_.getWorld().playAuxSFX(1002, p_82485_1_.getXInt(), p_82485_1_.getYInt(), p_82485_1_.getZInt(), 0);
protected void playDispenseSound(IBlockSource source) {
source.getWorld().playAuxSFX(1002, source.getXInt(), source.getYInt(), source.getZInt(), 0);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/tconstruct/smeltery/blocks/PaneBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public void registerBlockIcons(IIconRegister iconRegister) {

@Override
@SideOnly(Side.CLIENT)
public IIcon func_149735_b(int p_149735_1_, int p_149735_2_) {
return icons[p_149735_2_];
public IIcon func_149735_b(int side, int meta) {
return icons[meta];
}

@Override
Expand All @@ -52,8 +52,8 @@ public IIcon func_150104_b(int p_150104_1_) {
}

@Override
public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
return icons[p_149691_2_];
public IIcon getIcon(int side, int meta) {
return icons[meta];
}

@Override
Expand Down
13 changes: 5 additions & 8 deletions src/main/java/tconstruct/tools/blocks/BattlesignBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,11 @@ public int getRenderType() {

@SideOnly(Side.CLIENT)
@Override
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_,
int p_149646_5_) {
return p_149646_5_ == 0 && this.minY > 0.0D || (p_149646_5_ == 1 && this.maxY < 1.0D || (p_149646_5_ == 2
&& this.minZ > 0.0D
|| (p_149646_5_ == 3 && this.maxZ < 1.0D || (p_149646_5_ == 4 && this.minX > 0.0D || (p_149646_5_ == 5
&& this.maxX < 1.0D
|| !(p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_).isOpaqueCube()
&& p_149646_1_.getBlock(p_149646_2_, p_149646_3_ + 1, p_149646_4_).isOpaqueCube()))))));
public boolean shouldSideBeRendered(IBlockAccess worldIn, int x, int y, int z, int side) {
return side == 0 && this.minY > 0.0D || (side == 1 && this.maxY < 1.0D
|| (side == 2 && this.minZ > 0.0D || (side == 3 && this.maxZ < 1.0D || (side == 4 && this.minX > 0.0D
|| (side == 5 && this.maxX < 1.0D || !(worldIn.getBlock(x, y, z).isOpaqueCube()
&& worldIn.getBlock(x, y + 1, z).isOpaqueCube()))))));
}

@Override
Expand Down
9 changes: 2 additions & 7 deletions src/main/java/tconstruct/tools/gui/ToolStationGuiHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,7 @@ private static void drawAccessoryStats(AccessoryCore core, NBTTagCompound tags)
/**
* Renders the specified text to the screen, center-aligned. Copied out of GUI
*/
public static void drawCenteredString(FontRenderer p_73732_1_, String p_73732_2_, int p_73732_3_, int p_73732_4_,
int p_73732_5_) {
p_73732_1_.drawStringWithShadow(
p_73732_2_,
p_73732_3_ - p_73732_1_.getStringWidth(p_73732_2_) / 2,
p_73732_4_,
p_73732_5_);
public static void drawCenteredString(FontRenderer fontRendererIn, String text, int x, int y, int color) {
fontRendererIn.drawStringWithShadow(text, x - fontRendererIn.getStringWidth(text) / 2, y, color);
}
}
26 changes: 13 additions & 13 deletions src/main/java/tconstruct/world/blocks/StoneTorch.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,22 @@ public void updateTick(World par1World, int par2, int par3, int par4, Random ran
}

// JAVADOC METHOD $$ func_149726_b
public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_) {
if (p_149726_1_.getBlockMetadata(p_149726_2_, p_149726_3_, p_149726_4_) == 0) {
if (p_149726_1_.isSideSolid(p_149726_2_ - 1, p_149726_3_, p_149726_4_, EAST, true)) {
p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 1, 2);
} else if (p_149726_1_.isSideSolid(p_149726_2_ + 1, p_149726_3_, p_149726_4_, WEST, true)) {
p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 2, 2);
} else if (p_149726_1_.isSideSolid(p_149726_2_, p_149726_3_, p_149726_4_ - 1, SOUTH, true)) {
p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 3, 2);
} else if (p_149726_1_.isSideSolid(p_149726_2_, p_149726_3_, p_149726_4_ + 1, NORTH, true)) {
p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 4, 2);
} else if (this.canPlaceTorchOn(p_149726_1_, p_149726_2_, p_149726_3_ - 1, p_149726_4_)) {
p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 5, 2);
public void onBlockAdded(World worldIn, int x, int y, int z) {
if (worldIn.getBlockMetadata(x, y, z) == 0) {
if (worldIn.isSideSolid(x - 1, y, z, EAST, true)) {
worldIn.setBlockMetadataWithNotify(x, y, z, 1, 2);
} else if (worldIn.isSideSolid(x + 1, y, z, WEST, true)) {
worldIn.setBlockMetadataWithNotify(x, y, z, 2, 2);
} else if (worldIn.isSideSolid(x, y, z - 1, SOUTH, true)) {
worldIn.setBlockMetadataWithNotify(x, y, z, 3, 2);
} else if (worldIn.isSideSolid(x, y, z + 1, NORTH, true)) {
worldIn.setBlockMetadataWithNotify(x, y, z, 4, 2);
} else if (this.canPlaceTorchOn(worldIn, x, y - 1, z)) {
worldIn.setBlockMetadataWithNotify(x, y, z, 5, 2);
}
}

this.dropTorchIfCantStay(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);
this.dropTorchIfCantStay(worldIn, x, y, z);
}

@Override
Expand Down

0 comments on commit c5d7770

Please sign in to comment.